Monday, June 29, 2009

Goin' Groovy

Over the past month I've been spending a lot of time w/ Groovy and Grails. So far I'm pretty impressed! Groovy really does reduce Java's "signal-to-noise" ratio (i.e. less code for the same functionality) and the fact that Groovy was designed from the ground up to run on the JVM is definitely a plus for me! Also, the fact that Grails builds on Spring MVC and Hibernate (via GORM) helped me get up-and-running quickly.

A few weeks back I attended a Groovy Code Camp here in Phoenix. One of the speakers said that once you program in Groovy, it'll change the way you think when trying to solve problems. I didn't think too much about that statement, but then the following week he was proved right. Even after only a few weeks of using Groovy I went back to my job working with Java and found times where I was coding and thought things like:
"I could write this a lot more cleanly if I had closures!"
"Some named parameters would be nice here!"
"I sure could sure XML Slurper right now!"
"Why do I have to type 'public' so often?"
"Groovy Truth - how I miss thee greatly!"
Anyways, you get the picture. It's funny -- my first impression of Groovy was that it was TOO powerful. For instance, in Groovy we really do not NEED an external AOP framework (a la AspectJ) because that power is built into the language! Now I'm beginning to see that Groovy's "power" frees me from the little things and allows me to write cleaner and more concise code.

Anywho, those are just my initial impressions after dabbling with Groovy.

0 comments: