Posts Tagged ‘Netbeans’

Groovy Without Grails

Tuesday, June 3rd, 2008

me: So I’ve integrated Groovy quite nicely into my Java project.

coworker: It must be a Grails project.

me:  Nope!  It’s a Swing desktop application.

coworker: Oh sure, makes sense, you’re probably using the excellent Groovy SwingBuilder.

me: Wrong again, coworker!

coworker:  Whaa?!  Well then what could you possibly be using Groovy for?

me: Great question!  One that will be answered in a future post (despite the bait and switch title of this post).  For now though, it’s:

Groovy IDE Showdown!

When I started using Groovy about two months ago, I scoured the landscape of Java IDEs in search of the one with the best Groovy support.  I searched high and low, but in the end only had the attention span to try out three.

So here we go:

Netbeans:

I had started using Netbeans at the beginning of this project (about two months prior to the time in question).  Version 6.0 had just been released and spirits were high in the Netbeans community.  And why shouldn’t they be?  Netbeans was a veritable Rags to Riches story, rising from the horribleness of Forte, wading through the slow start up times of every version before version 6, to arrive at actually a very decent IDE.

The winds of change seemed to be blowing in Netbeans’ direction, and I wanted to blow in that direction as well.  So I abandoned Eclipse, my IDE of five years running, for greener pastures and faster build times.

I took to using Netbeans for my Java development very quickly.  However, this was less Netbeans doing, and mostly because I’m a very fast learner.  When it came time for Groovy integration, I thought, surely Sun will have a stellar plugin for the premiere scripting language that sits on Java.  It turns out that, no, they don’t, at least not yet.  They do have a plugin “under development”, due out in full sometime by the end of the year.

You can get early access to the plugin though if you’re willing to install the development version of the IDE.  I went ahead and did this, and then attempted to install the plugin, which I couldn’t get to work.  Given my previously established ability to pick things up quickly, you can imagine the surprise and frustration that I felt.

At some point in my tinkering, Netbeans refused to startup at all, mostly likely out of frustration with me over installing the nightly development build every morning for two weeks.

The writing was on the wall, I needed to leave Netbeans, and make a clean break of it.  After my messy breakup with Eclipse, I wasn’t keen to go back across that burned bridge, so I decided to see what all the fuss was about with IntelliJ.

 IntelliJ IDEA

I approached this IDE with suspicion, mostly because I didn’t trust its CamelCase spelling.  However, I figured that they were trying to spell “Intelligent”, which I could certainly relate to, but made a typo with the “J”, got flustered, stopped, and tried to distract from this blunder by shouting the second word.

I had heard that this IDE boasted the best Groovy support in the industry, so I forgave the non-zero price tag, downloaded the trial and fired it up.  The interface was a complete mystery to me.  All of the windows, widgets, gears, levers, and knobs seem to work in concert to confuse me.  After five minutes of aimlessly wandering around with my mouse (as in literally wandering the halls), I was starting to doubt what my mom had told me about being a Fast Learner.

Doubtless there was Groovy support hiding behind one of IDEA’s rickshaws, but I didn’t have the necessary IQ to derive where that might be.  So I was left having to go back, mouse tail between my legs, to my old friend, Eclipse.

Eclipse

It turns out that the Eclipse plugin for straight Groovy (no Grails, thank you very much) is quite good.  It has its issues, but it does syntax highlighting, incremental compiles, some static type checking, and even code completion.  It’s not perfect for sure, but better than Netbeans’ “Doesn’t work”, and IntelliJ’s “Whaa???”.