tags:

views:

193

answers:

1

We have a large scale Java web application project. I am considering integrating some Groovy code in situations where I think Groovy could reduce our effort. For example, XML parsing and unit testing.

Are there any "gotchas" or negative impacts for this scenario. For instance, perhaps it would make our build much more complicated. I have also heard of compatibility problems.

+2  A: 

I had a project that was combined Java and Groovy. I used Groovy for processing a text file and Java for Swing UI. Some of the difficulties where:

  • Poor Eclipse IDE support. The Groovy Eclipse plugin is quite poor, there's no support for command completion. Getting Groovy code to build in Eclipse is very very fragile and painful. Word in the street is that IntelliJ support is way better.
  • Maven integration. Also a bit tricky but not as bad as Eclipse.
  • Performance. After getting fed-up with with poor Eclipse support, I reimplemented my text processing in Java and discovered the performance was way faster. For my application, which reads a lines from a text file and looks for data at certain offsets, the Java code ran about 3x faster than Groovy.

For me, using Groovy wasn't worth it. You mileage may vary.

Steve Kuo
Thanks Steve. +1 Unfortunately, these non-Java JVM languages seem to have a long way to go before they are ready for prime time. Also poor eclipse support is a show-stopper.
Julien Chastang
though eclipse has poorer support for groovy, there are other IDE's like Intellij (though not free, if thats important to you), which has excellent support for groovy.
Chii