//log//

About

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

Eclipse 3.2 vs. NetBeans 5.5

Very well I remember the days I used to do my very first experiments using the Java programming language, utilizing a plain installation vim text editor (which still rocks, but preferrably for purposes other than that) to write .java files and the JDK 1.1 command line tools to build and run the final classes. Somehow, this way one always got stuck between a browser window (for reading across the JDK API documentation) and possibly two different shells – one to build the sources, and another one to immediately fix errors reported by the compiler in the source code. It felt sort of archaic, but it worked.

Though it seems this was only yesterday, now things drastically have changed. There are almost wagonloads of Java development tools around, aiming at making application development using the Java languages more easy, more productive, more “fun”. Some of them are Open Source software, some of them “just” free of charge, some of them packaged software you’re charged more or less money for. Two of them somehow made it to my notebook and now are happily living side-by-side, consuming disk space and being used for different purposes. That’s why, after all, I decided to write a short comparison of Netbeans (in its most up-to-date relese 5.5) and Eclipse (likewise, an installation built atop 3.2/Callisto), looking at what I do with them and why I prefer doing certain things in NetBeans and other things in Eclipse. Read on – but be aware, however, that this is just a personal point of view based upon day-to-day experiences; I hardly could say I really “tested” both tools against each other. However, there are a few points worth noting…

Introducing the actors…

Oh no, I will not waste my (and your) time writing too much about the two platforms themselves – those who are interested probably already know, and those who don’t won’t care anyhow. As an introduction, it should suffice saying that Eclipse (www.eclipse.org) is a project based upon code open-sourced by IBM a while ago, now growing into being a development environment for Java, sort of a “tool platform” extensible by a powerful plugin mechanism and also a platform for building “rich client” applications not necessarily related to software development. On the other side, NetBeans (www.netbeans.org) used to be a commercial Java IDE before bought and open-sourced by Sun in 2000. Basically, at least by version 5.5 NetBeans also has grown to be widely extensible with plugins, and there also is a NetBeans platform to build custom applications.

First things first: The basics…
At first, of course, what do the both of them have in common? Well, both NetBeans and Eclipse are very sophisticated development environments, providing a lot of comfort helping you to edit, build and deploy your applications. Their code editors are both very good, and functionality like syntax highlighting and code completion probably has to be considered a standard nowadays. NetBeans, here, does a little better in including the JDK and/or other API documentation along with showing completion recommentations, same as providing code completion also for taglib URIs while working with JSP or JSF (an enormously helpful feature), but overally, differences are rather small here. Same can be said about integrating either one of the two IDEs into remote repositories and versioning systems (we use subversion): Both offer this sort of functionality, and in both it has to be installed as an additional plugin.

In all the other features I really use, the basic functionality of the two is absolutely on par. Noteworthy small yet helpful option: NetBeans provides an “Eclipse” keymapping preconfigured so if you’re used to the Eclipse key shortcuts, you’ll immediately feel home here. And, personally, I think the NetBeans “Runtime” manager (the place where, while doing JEE development, you manage all your application servers, database servers and the like) “feels” a little cleaner and more straightforward than this is done in Eclipse. But maybe this is just a matter of taste.

Also probably a matter of taste is whether you prefer the Eclipse or the NetBeans way of handling projects. Whereas Eclipse is built around the idea of “workspaces” (separate configurations per default including project source code and everything related to it), NetBeans uses to store all of its configuration options in $HOME/.netbeans/, leaving you to store your projects wherever you like. This is not completely irrelevant as NetBeans relies upon ant scripts to build and deploy projects, so a NetBeans project easily might be built and deployed even while the IDE is not running. There are good and bad things about the both of these approaches – I personally tend to prefer the latter one though.

Desktop Java
Sure thing: NetBeans is unbeatable here, and this is mainly because of Project ‘Matisse’, the User Interface creation tool to be found in post-5.0 versions of NetBeans. Without a doubt this is the best visual UI builder to be found to date and definitely the reason to choose NetBeans rather than Eclipse while building Java desktop applications. Supporting Swing and AWT, you can be rather sure to use Matisse/NetBeans in order to easily build a GUI that looks and feels all the same on all “Java-enabled” operating system plattforms. And, making use of features like the new GroupLayout and the baseline alignment (see this demo to get an idea), you can spend less time on trying to get your components all spread across your application window – so more time to actually build a good architecture and possibly write good code. 😉

Server Java

JEE or J2EE or however – while getting into enterprise computing, one needs to think about other things than just building fancy desktop clients. As a developer, by then you are lost somewhere in the middle of servlet containers, web clients, web services and possibly database servers, and you definitely want to have a tool that helps you getting through this (especially when building J2EE 1.4 applications including the vast amount of XML configuration required for that). In NetBeans, getting an application consisting of EJBs, Web Services and Thin Clients up and running is amazingly easy – given, and this is the drawback I see here, you accept certain boundaries, or, in this case, stay with the technology NetBeans does best with, in other words the Sun Java Application Server or glassfish. If you try to choose some other platform, it seems that you lose some if not all the comfortable things NetBeans has to offer, at least unless this platform is fully integrated and functional in that environment. Eclipse already does better here, providing support for a wide range of application servers or servlet containers, with a deployment and management tool as homogenous as somehow possible. Want to have a slim servlet/jsp based solution running inside jetty? Want to do some more using the tomcat container? Possibly thinking of JBoss or JOnAS or even glassfish? Most of them work rather well with Eclipse, so switching between them (inasmuch as your applications aren’t including container-specific code and functionality) is quite straightforward. This, theoretically, would also work in NetBeans, and also here some projects are underway, but by now Eclipse does better about that.

External Frameworks

Diversity is one of the main strengths of the Eclipse platform, there is an incredibly huge repository of both open-source and proprietary plugins to extend the Eclipse core functionality in many ways. No matter whether you want to do ESB using Mule, build your applications atop the Spring Framework, want to work with Web Services using Apache Axis(2) or need to build a configuration for the iBatis DB abstraction layer – some tool adding convenient functionality to your Eclipse base is right at hand. Talking about NetBeans, the plugin repository is yet rather small, and support for external (read: non-standard) frameworks currently limited to Struts. Surely this is likely to change in near future given that some more users and developers are to adopt NetBeans (in example, there is a spring-netbeans project around already, and the first versions look kinda promising), but right now, nothing can beat Eclipse here.

Non-Java Development

Talking “diversity” again. And again, nothing can come up against Eclipse, featuring plugins for C, C++, Python/Jython, Ruby, Groovy, PHP, Perl and almost every programming language you can think of. This also includes a very powerful LaTeX editing environment called texlipse (which I heavily relied upon while writing my studies papers as well as my diploma thesis). Right here and right now, NetBeans only has to offer a C/C++ environment, though support for at least a bunch of scripting languages seems to be on its way. Let’s see how this will turn out.

Apart from that, not completely “non-Java”, but not necessarily tied to it, it is worth noting that an advantage of NetBeans is its fairly well-working UML creation environment to support most of the basic UML diagram types and thus be rather helpful if you intend to do modeling and coding using the same tool.

Conclusions

As to be supposed, there is no “winner”, there are just different IDE recommendations to fit different situations. These are my conclusions, however:

  • NetBeans probably will be your best choice if you are only into Java development, if you want to build (desktop) applications fast, and if you don’t want / need to care about IDE support for any sort of external framework or API. If this is yours, you’ll get a decent development environment supporting your work in a rather effective way, and also being a little more resource-friendly by leaving out features you won’t need, anyhow. You will get plenty of good tutorials and pieces of documentation at the NetBeans knowledge base to help you getting smoothly started into whatever you are about to do. And, if you decide to, say, do EE application development using glassfish or desktop application development using Swing, you will get an extremely homogenous, perfectly integrated environment that hardly leaves anything to be desired.
  • Use Eclipse if you want to do more, if you heavily rely on “external” (read: non-JCP/Sun) frameworks and if you want your IDE to support working with them in a pleasant way. You will love Eclipse if you’re not just limited to using Java but also need to handle code written in other (possibly scripting) languages and want to use the same tool altogether. Besides this, Eclipse by now still is a good choice if you think about a platform to build your application upon – for what I have seen so far (Netbeans folks: feel invited to correct me if I’ve all gone wrong here!), frameworks like EMF, GEF or VE provide you with a wide range of APIs and components for building your own applications around a given data model, and for handling that data in a meaningful way.

After all, looking at the pros and cons, I am rather sure that I will both run Eclipse for projects which are up and running while the same time playing around with NetBeans and glassfish to see how it does. And, overally, it feels good that there is some choice. 🙂

9. November 2006

Filed under:

english , tech , thoughts , tools