You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Antonio Gallardo <ag...@agssa.net> on 2004/03/31 07:40:52 UTC

[RT] Groovy in Cocoon?

Hi:

Reading the http://www.planetapache.org/ I saw a blog from Sylvain about
Groovy was acepted in the JCP. The last days Groovy was often cited on the
list and I need to confes my total ignorance about Groovy. :-(

So I decide to put my nose inside and what I saw is really amazing!

After seeing this: http://groovy.codehaus.org/markup.html

Since I cannot stop thinking in Cocoon, some interesting points comes to
my mind that would be great using Groovy in Cocoon:

1-Allowing write Groovy code inside Cocoon.
It would be fine. The entry barrier for new developers can be lowered. I
often found my self reading the same methods wrote in diferent forms
accross the blocks. Many parts of the actual code can be many times
shorter and clearer than it is today. Code can will be can be very
simplified with that. For example in CForms can benefit a lot using Groovy
instead of Java. Of course I don't mean a full "start from scratch", but I
thought about allowing writing new code in Groovy. In fact Groovy code
ends compiled in Java Bytecode. I know also there can be performance
concerns about this move and agree some test need to be done.

2-Groovy Flow Engine.
AFAIK, Groovy lacks of continuation support. This is the really main point
in a Flow Engine. But seeing that Groovy ends to Java bytecode, then maybe
the current new JavaFlow Block (thanks again to Stephen and Torsten) can
come to the rescue. I am seriously thinking in replace Java(Script) Flow
Engine with a Groovy Flow Engine. It will be a great move.

3-Eclipse || jEdit support?
It exists, not as we wish, but on development.
Eclipse: http://groovy.codehaus.org/eclipse.html
jEdit: http://groovy.codehaus.org/jedit.html

4-Bean support:
You need to see this: http://groovy.codehaus.org/beans.html
I am also thinking in writing a Druid Bean generator for Groovy.

5-How it differ from Java?
http://groovy.codehaus.org/javadiff.html

6-What is the license?
AFAIK, we can use it: http://groovy.codehaus.org/faq.html#licence

7-More info?
Website: http://groovy.codehaus.org/

Comments are welcome.

Best Regards,

Antonio Gallardo.


Re: [RT] Groovy in Cocoon?

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Antonio,

I've been watching Groovy for a while, and share your feelings that it 
could be a very welcome addition to the Cocoon toolset.

> ...1-Allowing write Groovy code inside Cocoon....

The BSF already supports Groovy, and we have a BSF block (which I know 
little about), so something must be possible already.

And when you see the nice ways in which Groovy can generate XML or make 
SQL queries, it sounds like Groovy could play well with Cocoon, given 
the right interfaces.

> ...2-Groovy Flow Engine.
> AFAIK, Groovy lacks of continuation support. This is the really main 
> point
> in a Flow Engine. But seeing that Groovy ends to Java bytecode, then 
> maybe
> the current new JavaFlow Block (thanks again to Stephen and Torsten) 
> can
> come to the rescue....

Yes, this is certainly possible.

> I am seriously thinking in replace Java(Script) Flow
> Engine with a Groovy Flow Engine. It will be a great move....

Hmmm...technically I tend to agree but we must be careful to stay 
focused on one official tool for Flow and Forms. The last months have 
shown that clearly adopting one recommended way of doing things helps 
our users a lot.

Of course, having additional experimental stuff in parallel is great, 
but IMHO we shouldn't jump to conclusions until the technical proof is 
here.

OTOH I'm definitely convinced that the combination of

a) java
b) a good scripting language
c) powerful presentation tools

is killer for development today. Cocoon provides a) and c) but is IMHO 
a bit lacking or fragmented regarding b). Having the same scripting 
language everywhere (instead of javascript + XSP + others) would be a 
Good Thing in my opinion.

So, like you, I'm convinced that Groovy can play a very important role 
in Cocoon in the future. The first steps might be to write some 
examples in the bsf block, or write a Groovy block which is more 
tightly integrated, see [1]. I'm thinking (dreaming?) of Groovy-based 
Generators, Transformers and Serializers for example, I don't know if 
this is possible with the bsf block as it stands.

-Bertrand

[1] James Strachan's comment on Groovy and the BSF
http://radio.weblogs.com/0112098/2004/01/23.html


Re: [RT] Groovy in Cocoon?

Posted by Antonio Gallardo <ag...@agssa.net>.
Tim Larson dijo:
> This motivated me to do some digging, and indeed Groovy does look very
> intesting.  A friendly, easier (less typing) varient of Java with the
> possibility of compiled code with a interpreted-style development cycle
> would be very welcome by me. The idea of experimenting with Groovy
> flowscript is also very intriguing.

Happy to hear that!

> A virtual tall glass of crystal-clear distilled mountain water to
> whoever documents step-by-step how to integrate this into Cocoon.

This is a really Big temptation. Believe it or not, this is currently on
the top of my large TODO list right after the end the current project! ;-D

Best Regards,

Antonio Gallardo

Re: [RT] Groovy in Cocoon?

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 31, 2004, at 12:29 PM, Tim Larson wrote:

> <...snip>
>
> A virtual tall glass of crystal-clear distilled mountain water to
> whoever documents step-by-step how to integrate this into Cocoon.

As a beverage, that's practically virtual already :-)


Re: [RT] Groovy in Cocoon?

Posted by Tim Larson <ti...@keow.org>.
On Tue, Mar 30, 2004 at 11:40:52PM -0600, Antonio Gallardo wrote:
> Hi:
> 
> Reading the http://www.planetapache.org/ I saw a blog from Sylvain about
> Groovy was acepted in the JCP. The last days Groovy was often cited on the
> list and I need to confes my total ignorance about Groovy. :-(
> 
> So I decide to put my nose inside and what I saw is really amazing!
> 
> After seeing this: http://groovy.codehaus.org/markup.html
> 
> Since I cannot stop thinking in Cocoon, some interesting points comes to
> my mind that would be great using Groovy in Cocoon:

This motivated me to do some digging, and indeed Groovy does look very
intesting.  A friendly, easier (less typing) varient of Java with the
possibility of compiled code with a interpreted-style development cycle
would be very welcome by me. The idea of experimenting with Groovy
flowscript is also very intriguing.

A virtual tall glass of crystal-clear distilled mountain water to
whoever documents step-by-step how to integrate this into Cocoon.

--Tim Larson