Over a million developers have joined DZone.

What's the Status of NetBeans IDE's Groovy Editor?

DZone 's Guide to

What's the Status of NetBeans IDE's Groovy Editor?

· Java Zone ·
Free Resource

Geertjan Wielenga is a Sun employee, part of NetBeans IDE community and NetBeans IDE Zone Leader here on DZone. He worked on the Groovy plugin for NetBeans IDE. I asked him about the status of the NetBeans IDE Groovy support, Sun's support for Groovy and his involvement in the Groovy community. He shares his own opinions here, based on his earlier work with the Groovy editor and his contacts with the current developers working on it.

Q: Thanks for taking this interview Geertjan. You've been involved with the Groovy plugin for NetBeans IDE. What's the latest Groovy news from NetBeans IDE land?

A: Well, compared to a year ago, or even 6 months ago, Groovy development in NetBeans IDE has made incredible strides. For the first time, we actually have a team of developers officially working on integrating Groovy (and Grails!) in NetBeans IDE. Previously, all work was done unofficially, in people's free time, kind of chaotically and without much planning. Now that developers have officially been assigned to this work, their performance reviews and so on depend on the progress and quality of the work done on this plugin, and various announcements have been made about this work, so now Sun has officially positioned itself within the Groovy arena, as far as NetBeans IDE tooling is concerned. That, all on its own, is extremely positive.


The second significant development is the work done by Tor Norbye and Martin Krauskopf on Ruby/JRuby in NetBeans IDE. The framework that they've created forms the basis of the work that is now being done for Groovy. Everyone everywhere has praised the JRuby support in NetBeans IDE 6.0. It is genuinely one of the most important features of NetBeans IDE 6, probably one of the top 3 or so. So, the basis for Groovy support in NetBeans IDE 6 is laid. That basis is what is now being extended for Groovy. So, firstly, the JRuby work is significant for Groovy in that it is providing a complete and reusable language framework (which is being used elsewhere for Scala and Erlang). Secondly, if one looks at the quality of JRuby in NetBeans IDE, it isn't inconceivable to suppose that something of a similar quality will be a viable outcome of the Groovy work done in NetBeans IDE.

The principal developer in this area is Martin Adamek. His blog provides frequent updates on the direction and progress that's being made. Semantic analysis of Groovy code can already be done (see screenshot) and Grails artifacts can be generated from templates, as well as a full source structure from a project wizard. So, I think things are looking good, although there's still a very long way to go.

Q: Isn't the Groovy integration with for example the NetBeans IDE debugger different than for example JRuby? Do you think Groovy will get a special treatment here?

I believe a lot of Java-related support in NetBeans IDE will be reused in the Groovy editor. The debugger will more than likely be one of these. However, the underlying language framework that has been spun out of the JRuby editor is the basis of the Groovy editor.

Q: As a "Sun insider" some people quote your involvement in the Groovy community as a sign of Sun's support for Groovy. What's your take on that?

A: I like that perspective, because it's true. Sun is an organization with a lot of individuals, who work in teams, but who also have their own perspective and their own personal views on things. Often people wonder why JRuby support in NetBeans IDE has been so strongly (and even aggressively) developed, while Groovy has mostly been out in the cold. Well, looking at the answer to the previous question, that isn't entirely true. We had to start somewhere. If Groovy had been chosen, JRuby people might have asked the same question. Still, despite that, Groovy is in a truly unique position, since it is the only scripting language on the JVM, others are ports (e.g., JRuby is a port from Ruby). One would have thought that Groovy would therefore be the very first language that Sun would provide support for. Indeed, the case for Java is made stronger via Groovy, hence one would suppose that Sun would have a personal interest in pushing Groovy forward and that it would therefore be very eager to provide a first class editor for Groovy. I find myself being very sympathetic to this perspective. On the other hand, all the mistakes made in the creation of the JRuby editor will not need to be made again, since the Groovy editor will in a sense be a second implementation of the NetBeans JRuby editor.

In addition, there's another argument that I can make sense of: IntelliJ has brilliant support for Groovy. At the time when the JRuby support started being developed for NetBeans IDE, there was no JRuby support in any IDE. At least, no 1st class support. So, Sun had a choice. Either try to create Groovy support in NetBeans IDE, while IntelliJ already had great support for Groovy, thus creating a kind of "arms race" between NetBeans IDE and IntelliJ, or... create 1st class JRuby support, which would position it uniquely, instead of as an alternative to IntelliJ. From this perspective, IntelliJ is the current leader in the IDE space for Groovy, while NetBeans IDE is in the same place for JRuby. Not bad positioning, in my humble opinion. Of course, a lot of what I am postulating here is conjecture and shouldn't be seen as official policy or something similar.

Also, by supporting Ruby/JRuby, it's clear that NetBeans IDE isn't purely a Java IDE anymore. How many new users would NetBeans IDE have gained if it had provided support for Groovy? Not necessarily many, compared to the number of new users that are coming in now thanks to the first class support that NetBeans IDE now has for JRuby. So, it all makes sense when you add up the various factors.

However, now that NetBeans IDE has made its mark with JRuby, the time is here for Groovy support to accelerate and, at some point, match that of IntelliJ. The only question in my mind is "when", not "if".

Q: What do you do for Sun?

I write tutorials and JavaHelp. I work in the docs group. I started out writing tutorials for web application development in NetBeans IDE. Increasingly, I've been focusing on plugin development and RCP development on the NetBeans Platform. I've also been involved in work on a few books on NetBeans IDE. Especially in the German-language a few interesting book-related developments are coming up soon, which is quite interesting.

Q: How and when did you start to use Groovy?

I can't remember exactly how I came across Groovy. But I've been interested in it from the first moment I started playing with it. I especially like how it works with files and how it cuts down on the lines of code one needs to write. Also, I like how it leverages all your knowledge of Java. Unlike other languages, you're not starting from scratch. You don't need to relearn anything. And you can use as much or as little as you want. It's very friendly and undemanding in that way.

Q: How did you get involved in the Groovy community?

Like most people, I wrote a few questions to the Groovy mailing list and then discovered how helpful the community is. I wrote a few interviews with key Groovy people for Javalobby, after I met a few at the Grails eXchange this year. I learned a lot from those interviews, especially from Jeremy Rayner and Guillaume Laforge.

Q: What's your view on the current support for Groovy in the different IDEs? And what can we expect one year from now?

IntelliJ is clearly the best, from what I've seen. I still haven't tried it, unfortunately. I want to do so soon, though. I predict that one year from now NetBeans IDE will be on par with IntelliJ. I know that's saying a lot, but all the pieces are present for that to happen within a year. Expect some surprises at JavaOne, even. I got on well with Scott Hickey from the Eclipse-Groovy plugin at the Grails eXchange and he helped me a lot in understanding some of the basic stuff. I wish Eclipse all of the best, of course. Code completion, one of any Groovy editor's crown jewel is something I'm looking forward to in particular.

Q: Do you prefer writing Groovy code in an IDE or a text editor?

An IDE, of course. Are there really people who prefer a text editor? They probably also prefer rubbing two sticks together to make fire...

Q: Where do you get your Groovy inspiration from?

The cool Groovy community. And when I find some interesting snippet, I try it out. The "Groovy In Action" book is brilliant too, giving me both a thorough understanding and lots of code snippets to learn from. And really well written on top of that.

Thanks for the interview Geertjan!


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}