Saturday, June 20, 2009

Groovy over Java

Dynamic languages, once relegated to hobbyist and small mom-pop development shops, now (as in the last 2-3 years) seem to be the latest fad in "enterprise" development shops. I think this was largely due to the success of Ruby on Rails and Python which showed that you can write maintainable large scale software using dynamic languages.

Groovy appears to be the Java community's answer to dynamic languages. Groovy is a superset of Java which means that your existing Java code should mostly work in a Groovy interpreter. Groovy provides many of the syntactic sugar that you see in dynamic languages such as key-value dictionaries (hash tables), named parameters, closure, and etc.. Groovy has been submitted to Java Community Process program for standardization.

I'm still a bit mixed about using dynamic languages because I like the security of compile-time type checking. However, I do see myself using Groovy to write my unit tests since the syntactic sugar can potentially make my unit tests easier and faster to write.

1 comment:

  1. Thanks for the post, I am techno savvy. I believe you hit the nail right on the head. I am highly impressed with your blog. It is very nicely explained. Your article adds best knowledge to our Java Online Training from India. or learn thru Java EE Online Training Students.