Getting Groovy (and Grails)

Explorations in Groovy and Grails Development

Archive for the ‘IDEs’ Category

The Gr8 Conference: Using IntelliJ IDEA

with 3 comments

After Graeme was done, Vaclav Pech did a half hour overview of some of the many features available for working with Groovy and Grails in IntelliJ IDEA, an IDE from JetBrains.

Given that you typically use Groovy and Java together, the theme of the presentation was the importance of making it easy to go between the two of them and to provide a consistent experience between them. There were lots of nice features like the ability to run Groovy and Java tests together, the ability to preview interfaces, generate stubs for extending java interfaces, etc. It even has support for teaching the IDE about specific dynamic methods so if (for instance), you mix or even inject via AST transformations a particular method into an object at runtime, you get tell IDEA that the class will have that method at runtime and it will provide some IDE support for that. There was also support for various refactorings, the ability to do command line Grails operations within the IDE and so on.

There is no question that currently, IntelliJ is the premier IDE for working with Groovy and Grails (although it’s also clear that SpringSource is working hard to make the Eclipse experience more usable than it currently is). Personally I find that for ad-hoc work, using TextMate on a Mac is ideal, but I’ve already picked up a personal license for IntelliJ (in the scheme of things, if you can’t invest $250 in improving your productivity, you’re probably not charging enough for your code!) and am slowly working through learning all of the keyboard shortcuts required to become really proficient in an IDE. I can see that as I start to work on larger projects it’ll really help with productivity.

Anyone used to using an IDE with a statically typed language like Java or C# is going to get a little surprised when they see the limitations imposed by working with a dynamic language. For example, I can’t even reliably “rename method”, because in a dynamic language, you can concatenate a string literal with the name of a method and use that to call the method, so it isn’t possibly to reliably rename all method references. There are some possible approaches that help with some of the issues using dynamic as well as static code analysis (you have a running copy of the application and use that to introspect it) but for a Java developer it is going to seem like a bit of a change of pace (luckily I mainly program in dynamic languages so I have little sense of what I’m missing!).

It was a good overview of some of the capabilities of the premier IDE for Groovy and Grails development, although a number of people I spoke to would have preferred a slightly slower pace, cutting down on the number of features covered to give us a bit of a better sense of how to use the features. Nobody would expect to become proficient in an IDE after a half hour demo, but by (for example) showing some of the features using the menus rather than using the keyboard shortcuts, it would have probably done a better job of presenting the features of the tool even though obviously nobody would actually develop that way.


Written by peterbell

May 21, 2009 at 6:04 pm

Posted in gr8, IDEs

Picking an IDE for Grails Development

with 3 comments

I’ve been using Eclipse for a while now for most of my development (with Textmate as a backup when I don’t want to fire up an entire IDE). However, coming to the Grails world recently it was pretty clear that the Groovy Eclipse plugin wasn’t really ready for prime time. There are some notes on using it for Grails development, but it didn’t seem to me to be a viable option for Grails development.

I looked for a while at using Netbeans for Grails development. When I first started looking, it appeared to be a non starter, but with the fairly recent announcements of version 6.5+ support for Grails it has become a much more credible contender. It doesn’t have debugging, support for GSPs and there can be performance issues, but if you’re in the market for an IDE, the price is right (free!) and I’d definitely recommend giving it a shot.

In the end, I decided to go with IntelliJ. I bought a license for 8.1. As a personal developer it’s $250 for a license, but if I do even one project in Grails and it saves me a morning it’ll have paid for itself. It’s the IDE that most of the core team seem to use, and while there have been some complaints about IntelliJ choking on Grails 1.1 projects (especially with global plugins) I think they’re going to continue to invest in keeping this as the premier IDE for Groovy/Grails development.

If I change my mind, I’ll certainly let you know! What do you think? What IDE did you choose (if any) and why? I’d also be interested to hear from anyone using Textmate or vi (I don’t speak to emacs people 🙂 – kidding!). Have you ever used an IDE? Were you already a long time text editor afficianado or did you choose to move because you felt (for instance) that the benefits of an IDE were less in a dynamic language (limitations on code completion, etc.)?

Written by peterbell

March 26, 2009 at 2:26 pm

Posted in Grails, IDEs