« Return to Thread: Anyone else using Groovy?

Anyone else using Groovy?

by Tim Fennell-3 :: Rate this Message:

Reply to Author | View in Thread

Hi All,

So I tried out Groovy again last night.  I'd tried it before,  
somewhere around the 1.0 release, and wrote it off at that time for  
Stripes development (and JPA/hibernate development too) due to the  
lack of support for generics and annotations - which are fairly  
critical to making programming in Stripes easy and fun.  Anyway I  
figured it was time to check back in and see what progress the Groovy  
devs have made, and I have to say I'm really impressed!

The Groovy 1.5 release supports annotations and generics (and enums  
and other things too) well enough that it's easy to start writing  
ActionBeans in Stripes.  As a challenge I took our nastiest bean  
(essentially an agglomeration of all the admin actions in our  
application - it's only ever seen/used by developers) with about 20  
different handlers in it and converted it to Groovy.  It went  
surprisingly well, and cut down on quite a bit of junk - most  
noticably getting rid of 2-3 pages of getter/setter methods.  But it  
also allowed me to tidy up in other places as I tried out some of the  
groovy idioms like using closures to iterate over lists.

Groovy 1.5 also contains a "joint compiler" called groovyc which is  
essentially a drop in replacement for javac that compiles both groovy  
and java at the same time.  As a result it took me about 5 minutes to  
modify our build process to include groovy source.  And to give me  
favorite IDE a plug, the IntelliJ Groovy plugin is excellent.  It's  
not quite as good as writing Java yet, but it's close enough and  
completion works 99% of the time.

So is anyone else on the list using groovy to write ActionBeans or  
other things?  If you're not, I'd encourage you to check it out.  I  
think now that it supports the major Java 5 features it's a great  
language to work in.

-t

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

 « Return to Thread: Anyone else using Groovy?