One of the purposes I had for this year was learning Groovy. And, since the beginning, I knew IWebMvc was going to support Groovy although I didn't have a real clue about the extension of this support. During the last week I've worked to get both things done. As a matter of fact, it was easy and I learned a couple or three things in the process that may be of interest to some Groovy beginners (like me). Let's start with the cool features:
- Prototyping
Scripting is FAST and it really saves time. If you're like me and start coding just to get an idea of the problem and explore possible solutions this feature alone makes Groovy worth the effort. It boosts productivity by an order of magnitude! - Spring support
Well..Spring is always good, isn't it? Unless you're using JavaRebel (and enjoying it already), refreshable beans are a bless. And it also allows (encourages?) quick & dirty hacks ;-) - Groovy beans
I migrated the Domain model of IWebMvc to Groovy. I don't know the lines of code that where removed in the process. A boilerplate killer! - Language entensions
GStrings and Object extensions (read Collection) are outstanding. I won't even mention closures (you should be used to them via Javascript). Really useful - Choice
Better let the developer choose which language is better suited for a particular problem. IMHO any modern Java based framework should include Groovy support.
- Groovy != Java
This may come as a surprise to some (it was for me) and be obvious for others (heck it's Groovy and not Java!). The fact is the relation is tight: they both work in the JVM, can work together and share syntax but..they're different. Subtle differences really but some that make impossible to rename your Java classes to .groovy and expect your application to work. - Groovyc
Joint compilation is a very intelligent idea and Groovyc works very well but it's not on the same league as Javac. It lacks maturity, reliability and speed. I hope Sun can help the Groovy team as they did with JRuby. - Migration
After adding Groovy support to IWebMvc I was forced to move some code to Groovy even if just to serve as an example. I had mixed feelings with the results. Groovy is amazing to improve productivity but you miss that when you have an already working code. And then there's the static typing issue..I wasn't happy to loose it. At all (I guess my code is not that groovysh)
- IDE support
I'm a Netbeans user. There's no current Groovy plug-in that works with 6.1RC2 out-of-the-box. You may try to install one from the Development Update Center (I couldn't). One doesn't know how much he relies on things like syntax highlighting (let's not say debugging!)...IDE support in Netbeans is bluntly put, awful. - Generics
Are Generics in open confrontation with dynamic typing? I guess they are. Java support for Generics is mild...Groovy's...much worse.

0 comentarios:
Publicar un comentario en la entrada