//log//

About

Lost in transit.
Moving.
Returning.
You're welcome.

move#1 : NetBeans 6.0

Well… I wasn’t sure I’d do it, and yet I am almost through: Quite a bunch of weeks ago I spent quite some of my spare time moving most of my work projects to maven2 as build / dependency management / deployment system. And now, I’m obviously off to do another switch, right from Eclipse Europa 3.3 to NetBeans 6.0M10 … I already did a NetBeans / Eclipse comparison here earlier, and while then and now moving on with Eclipse, I never really stopped looking at or dealing with NetBeans… Looking at the upcoming 6.0 release, reconsidering this position seems to be inavoidable…

IDE

Playing with Eclipse Europa, in some situations, has left my user experience a little unpleasant once in a while, lately. Eclipse is a huge and powerful tool, loaded with usable features, offering plugins and toolings and support for most frameworks, servers, … you might dream of. Yet, in some situations, I have seen that even having these plugins available doesn’t necessarily mean having them available in a well-integrated way. Some things that, working with them, sort of started bugging me recently:

  • First off, Eclipse has quite a good maven2 integration thanks to m2eclipse. However, aside from that, Eclipse also has its own build / project management system and it seems the two of them don’t go together that well: Running “Clean” on a project would leave one expecting the project to be, well, cleaned, same as one would expect a project to be built while running “Build”. Using a maven2 project, you wouldn’t probably waste time pondering whether “clean” could be anything else than mvn clean or “build” anything other than, say, mvn install (even though one could argue on the second thing). However, in Eclipse I can’t get this transparency in place, I can’t get m2eclipse integrated as much as having mvn clean invoked on my projects whenever I choose “Projects” -> “Clean” so even if I do so, I have to manually run “maven2 clean” on each of my maven2 projects…
  • In the end, most of my essential projects are maven2 war artifacts. Eclipse has a great set of web-related tools offered by the Web Tools Platform package which I excessively used in the past. However, using m2eclipse (or any other maven2 Eclipse enablement) right now unfortunately means losing all the WTP features in that very project as m2 war artifacts aren’t “Dynamic Web Projects” in terms of Eclipse project management. This is a little unconvenient to say the very least; though (apparently) there are efforts underway to change these things by more tightly integrating m2eclipse with the Eclipse build mechanisms and the project metadata structure to provide this sort of support, so far it seems quite a way to go…
  • Asides WTP, SpringIDE is the very application that always made me come back to Eclipse before. However, by now I haven’t yet managed getting springide to seamlessly integrate with m2 jar artifacts, making it also practically unusable right now…

Beans…

No, I didn’t immediately want to switch IDE just based upon being unhappy with some of the things in Eclipse while not yet knowing about things that might be same as unconvenient in another environment. Thus, more or less three weeks ago I decided to make sort of a “field test” to see how things work: I decided to just commit all my open changes in my Eclipse workspace to our SVN repository, close Europa for a while, import these projects to NetBeans 6.0M10 and just see how things come along…

In the end, this time passed leaving me doing quite a lot of work with NetBeans 6.0M10, and so far I consider switching here a rather sound and meaningful idea. Looking at the things pointed out above, it seems that NetBeans does better in most of these areas:

First off, NetBeans has an excellent maven2 integration, obviously replacing ant as the default build mechanism for maven2 projects, thus being really tightly integrated into the whole IDE clean / build facilities, which is a really good thing. It feels more sane, in some ways, and it also has another advantage: While Eclipse requires a bunch of, well, Eclipse specific (proprietary?) metadata to be around, in NetBeans the presence of pom.xml obviously is sufficient to make the IDE recognize and, in turns, successfully open any maven2 project, be that checked out of SVN or just opened from an Eclipse workspace. This is extremely convenient as it also, obviously, reduced the integration effort required to make maven2 projects work well with the IDE.

Following that, possibly not really surprising, NetBeans maven2 support also includes support for using all the NetBeans web related features on maven2 war artifacts, including the outstanding web.xml editor or the option to run a project on a locally configured application server runtime. This is rather pleasing while doing local development and testing. Asides that, as a small notable feature, I like about NetBeans maven2 integration that I can define “custom” maven2 goals to be run on each of the project, making integration of plugins for, in example, deploying war applications to remote application servers really easy. Something like this also can be achieved in Eclipse using the “External tools” setup but it’s far from being as convenient as the NetBeans integration is.

The only drawback, so far, is that the growing spring netbeans integration is far from complete and far from being a match for SpringIDE, but I fairly can live with that so far, given that by now at least a few of the other things work better, and given that one of the features I used most massively in SpringIDE (classpath code completion in applicationContext.xml can be achieved using the ClassPath Completion for XML plugin in NetBeans. So far, so good…

Some more good features…

A few other interesting things I NetBeans I noted (and almost immediately grew to like, but this surely is a matter of taste):

  • Personally, I think the NetBeans “Services” window is a better way of keeping track of installed “services” (be that JEE server runtimes or remote DBMS servers or web services or whatever…) than the same information spread across a set of different views in Eclipse. Feels more concise this way.
  • Using tomcat, I like the fact that NetBeans allows for configuring and starting a local tomcat installation the same way you’d possibly start it using the catalina.sh command from your shell. Having a preconfigured tomcat, in my opinion this is a way to be preferred to the Eclipse idea of running tomcat in a seperate configuration in the workspace (aside from keeping project space clean of temporary server configuration files…).
  • One feature I wouldn’t have discovered myself (Vaughn Spurlin and Gregg Sporar were so kind pointing this out on the nbusers mailing list) is the “Favorites” window: By now, more than once I used generic Eclipse “projects” to use Eclipse for content (like XML, XSD, HTML, … files) not really part of any “meaningful” development project. Competing with this, the “Favorites” window in NetBeans provides more or less a generic file system view allowing for using IDE tools (except for anything that requires the project build infrastructure) on arbitrary files / folders out there, like editing external files, using versioning functionality on external folders and so on. While I agree that this possibly is a matter of taste, concept and paradigm, I think the NetBeans way of doing this is a little more universal, mainly as it keeps my workspaces from being cluttered with projects being around without really being projects.
  • Of course, the NetBeans visual GUI builder for Swing is a d**n cool feature coming in rather handy right now as I am in some case about to deal with also building a desktop client to one of our services.
  • Overally, using NetBeans is rather “fun” given that there is both an extensive, well sorted documentation repository and a very kind bunch of people on the mailing lists which seem to be outstandingly patient even dealing with people like me being absolute newbies possibly asking a vast set of silly starter questions… This really helps adopting a tool indeed…

Overall view…
Of course, NetBeans 6.0 also is not the perfect IDE and leaves a few things to be desired / improved later on. Most notably here in my opinion, a set of things I’d really like to see around anytime soon, the ability of choosing interfaces to implement and/or a superclass to extend while creating a new Java class possibly being the most important one, along with the question whether or not NetBeans could use a native SVN client one day instead of relying upon an “svn” binary installed on the host system. Asides this, however, these three weeks of working with 6.0M10 has shown the next stable NetBeans release to be a very usable, decent IDE making a Java developer’s life much easier in some respects. Thanks for the ride, folks, feel quite home here right now, guess I’m about to stay…

29. August 2007

Filed under:

english , netbeans , thoughts , tools