Common wisdom has it that IntelliJ is unrivalled for Groovy/Grails development. (At least among IntelliJ developers). However, sometimes it is good to question common wisdom, and decide for yourself based on real-world experience.

So, after some frustrations with the Grails support in IntelliJ, I decided to try out the latest beta version of NetBeans 6.7 with some Grails 1.1-RC projects.

My tests got off to a promising start. Netbeans recognized my Grails 1.1 project just fine - all I had to do was point it at the directory. This worked both for a Mavenized Grails project and a conventional one. I like the seamless integration NetBeans gives you with both Maven and Ant. This is actually smoother than IntelliJ, which seems to have trouble with Maven (or Ivy, for that matter) dependencies in Grails projects. (You do need to install the NetBeans Maven plugin to do this - once you do, NetBeans treats Maven projects superbly).

NetBeans understands the Grails project organization and life cycle very nicely. If you run the application using F6, it will run "grails run-app" (or mvn grails:run-app for a mavenized project). If you run the tests with ^F6, it runs "grails test-app". It is easy to create domain objects, integration test cases, and so forth - just right-click on the appropriate folder (see below).


NetBeans have been making great progress with their Groovy support, and this version shows some very nice code-completion features for Grails projects as well. For example, not only does it list the standard domain class methods (save(), get(), delete(),...) in the auto-completion list, it also figures out the dynamic ones based on your domain class (see below). Now that's seriously cool!


On the down side, GSP support seems to be a bit limited, and the GSP code completion hadn't made it into this beta. On the development plan, this feature is classed as P3 ("would be very nice to have"). I'd class it as P1 ("must have feature, task. Without it IDE might be even awkward to use. Almost bug. Will be fixed soon"), XX ("would be f**ing awesome to have"), - or possibly P0 ("IntelliJ has it so of course we need it"). But then again, I'm not coding it ;-).

Being a beta, there were some problems, though. I got a null pointer exception when I tried to install a plugin, for example. I haven't had any major crashes, though.

All in all, a very nice piece of work from the NetBeans guys. Kudos for helping to democratize good IDE support for Groovy and Grails!

"Best development course I have been on in a very long time...Greatly enjoyed the course...A 'must' course for serious Java developers..." - Coming soon to a city near you! Check out the new 2009 season of the Java Power Tools Bootcamps.