Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Eclipse, NetBeans, and IntelliJ: Assessing the Survivors of the Java IDE Wars : Page 2

Get a comprehensive comparison of the latest versions of the major IDEs in the Java development space: NetBeans, Eclipse/MyEclipse, and IntelliJ IDEA. Find out how well each performs in four common areas of development: Swing, JSP/Struts, JavaServer Faces, and J2EE/EJB 3.0.


advertisement
NetBeans 5.5

Vendor: Sun Microsystems
Website: www.netbeans.org
Price: Free/Open source
Distribution: Base + Enterprise Pack + Visual Web Pack

Installation
NetBeans 5.5, as well as its additional packs (e.g., Enterprise Pack with UML/BPEL/SOA and Visual Web Pack for JSF Development), is available as both ZIP downloads as well as cross-platform InstallShield installers. Under Windows, the installer integrates seamlessly into the OS, including registering the proper desktop shortcuts and adding an uninstaller in the Add/Remove Programs panel. Under Linux, it simply installs into the specified directory and creates a startup icon on the GNOME or KDE desktop. Unfortunately, it does not come packaged as an RPM or a .deb file, nor does it offer a standard repository, which would allow Linux users to install it as they do any other application.



General Features
At one time, NetBeans was synonymous with everything that was wrong with Swing: slow, bloated, ugly, and just plain unpleasant to work with. However, the NetBeans team has performed a massive overhaul of the entire IDE starting with version 5, and the combination of NetBeans 5.5 and JDK 1.6 provides arguably a top-notch user experience, in particular under Windows (Linux still has some UI glitches that are supposed to be addressed in NetBeans 6.0. In particular, version 5.5 lacks native GTK look and feel support).

The windowing system is about as advanced and flexible as one could imagine, with the ability to dock/hide/swap nearly any panel/editor in any possible configuration with great ease. I also found the menu layout very logical and easy to use, with all the most common functions being easily accessible (e.g., maintaining user libraries). All the while, overall stability and performance were excellent.

The basic Java editor is decent though definitely not the best in the field (in particular, code completion is somewhat slower than its competitors), but it is very workable. A basic set of refactoring functionality is also provided (in particular, the most commonly used rename/move features), although in my testing I found it often somewhat dangerous to use because it is not always context-aware. For example, renaming the package of an Action class in a Struts project does not update the corresponding entry in struts-config.xml (although it worked fine for refactoring JSF backing beans and updating their entries in faces-config.xml, as well as J2EE 1.4 sessions beans and their entries in ejb-jar.xml).

Swing Development
NetBeans's crown jewel is its famous new Matisse GUI designer, based upon the new GroupLayout layout manager, which originally was developed by the NetBeans team itself as an extension prior to being included in the base JDK. The combination of baseline support (i.e., the ability of controls to align automatically based on the position of the actual text within a control) makes creating professional looking UIs very easy. In fact, the powerful resizing and anchoring functionality make this the best UI designer I have seen for any language on any platform.

After installing version 5.5, I also grabbed the latest set of updates that were back ported to 5.5 from the newer 6.0 builds. These included some very productive features, such as automatic internationalization (with control per each form/dialog/panel as to which ResourceBundle contains all the internationalized strings), as well as the ability to use custom forms/panels (as long as they have been compiled at least once within your project). Matisse is a fine example of what the NetBeans team can do when they are at their best. (See Figure 1 for a sample of Matisse in action.)

Click to enlarge

Figure 1. Matisse with Custom JPanel Components

For Swing developers, an additional benefit of using NetBeans is the ability to use its very powerful RCP (Rich Client Platform) wizards for creating new, sophisticated Swing applications. In light of the popularity of Eclipse's SWT-based RCP, the NetBeans team has gone to great lengths to provide a viable Swing-based alternative and, dare I say, with impressive results (although the initial learning curve might be a bit steep for smaller projects).

JSP/Struts Development
NetBeans comes with a good JSP editor with all the basic features that one would expect and all the basic wizards and plumbing to start a new Struts project. The inclusion of an embedded Tomcat container makes developing and testing JSP apps particularly easy and fast. (Figure 2 shows the NetBeans web application wizard.)

Click to enlarge

Figure 2. NetBeans Web Application Wizard

The NetBeans web application wizard automatically configures web.xml and struts-config.xml and enables adding Tiles and Validator support. However, beyond that the only support it provides are some context menu options in struts-config.xml and wizards to add ActionForms, Actions, and Forwards. It offered no visual editors to show the page navigation within the application and provided absolutely no additional support for configuring Tiles and Validators (outside of creating the original configuration files and including the required libraries).

Personally, I found Struts support in 5.5 quite decent but definitely not as polished as what Matisse delivers. Also, no visual editor for JSP or HTML pages is available (not an issue for power coders, but a nice feature for more junior programmers). The lack of proper embedded JavaScript support for JSP editors along with only a basic CSS editor (though much better if the Visual Web Pack is installed) are areas that could use some improvements as well. (See Figure 3 for a sample of NetBeans's Struts support.)

Click to enlarge

Figure 3. Struts Support in NetBeans

JavaServer Faces Development
The NetBeans JSF support is pretty much identical to its Struts support. It provides a wizard to get a basic project started, includes the libraries, configures all the required files, and even provides code completion for backing beans' properties in the JSP editor, as well as a few wizards for navigation rules in faces-config.xml. No support for Apache MyFaces is available (only JSF RI), so the initial project setup has to be hacked by hand to swap out the JSF RI and use MyFaces.

No visual editors are provided whatsoever to maintain the faces-config.xml file. Everything is pretty much done through raw XML editing or the two or three basic context menu wizards. While this is workable and definitely sufficient for power coders, it hardly achieves the ease of use or productivity that other IDEs deliver for JSF developers.

However, the NetBeans Visual WebPack offers an alternate solution for building JSF applications by porting most of the features from Sun Java Studio Creator directly into NetBeans. This includes a Matisse-style GUI builder for web pages, with a rich set of JSF controls (recently open-sourced as Project Woodstock) that extend the basic JSF RI set, as well as support for data binding (both directly against database queries and even via JPA/Hibernate).

Despite all of these first-class features, the Visual Web Pack has a few drawbacks that might stop many Java shops from using it, namely:

  1. It lacks support for page templates (although you can save a Page as a template and use it as a base for new bases, but obviously changes to it do not cascade down). Support for either Facelets or the Tiles support from MyFaces would be of great use here.
  2. It lacks support for Apache MyFaces (potentially an issue when deploying to app servers that use MyFaces RI instead of Sun's implementation, such as JBoss).
  3. It has inflexible auto-generation of backing beans (which basically mimic the structural context of each JSF page in a straight ASP.NET fashion, making it unusable with conversation-oriented backing beans such as the ones required by JBoss Seam).

A great-to-have feature would be support for Facelets, which many in the JSF community are pushing as the total replacement for JSP (in particular, the JBoss Seam team has openly campaigned for it in all of its documentation).

Though if the NetBeans team addresses these deficiencies in the next release, I can't imagine any tool being as productive as the Visual Web Pack for JSF development.

Enterprise Development
NetBeans 5.5 was the first IDE to offer support for JPA and EJB 3.0, and it delivered quite well in this area. In particular, the auto-generation of JPA entity classes with annotations (including proper setup of the persistence.xml file, even with basic connection information) has saved me countless hours of boring, repetitive hand coding. The auto-generated JPA code is very high quality and instantly usable. Frankly speaking, developing a Swing app with Matisse and querying/updating a database via JPA was the first time my productivity has reached the level I worked at in PowerBuilder many years ago (which I still remember as the most productive client/server UI development tool ever, even though it had more than its share of imperfections).

For pure enterprise development, NetBeans offers both top-notch J2EE 1.4 and Java EE 5 support. In particular, for J2EE 1.4 projects, the EJB wizards take care of generating all the required code (including the business/home/remote interfaces, as well as their stub implementations—not to mention wiring the ejb-jar.xml configuration file). In short, NetBeans takes care of most of the verbosity related to J2EE 1.4 and provides polished out-of-the-box support for Java EE 5 as well (the first IDE to do so, although IDEA followed quite quickly).

On the down side, NetBeans offers official support only for deploying enterprise applications to GlassFish/Sun Application Server and JBoss. Nonetheless, the update site offers additional plugins for WebLogic and WebSphere, although I am not sure if the NetBeans team officially supports them.

The free Enterprise packs also add powerful UML diagram features (including two-way editing and synchronization with Java code), as well as BPEL/SOA editors. However, evaluating these was outside the scope of this review.

Suggestion to NetBeans
I really like NetBeans. Its underdog team came out fighting from a position where everyone thought Eclipse would eat it alive, and it has delivered some amazing features in its latest release (and much more to come in NetBeans 6.0). However, it simply does not have the same size community that Eclipse does. This starts to detract from the product when it comes to features that it does not offer out of the box (e.g., Google Web Toolkit, JBoss Seam, Jasper Reports, Spring, Tapestry, XDoclet, Echo2, Apache MyFaces, etc).

One of the smart things IBM did early on with Eclipse was give up control and create an Eclipse foundation, which has attracted a lot of third-party developers. Maybe it's time Sun gave up its iron grip on NetBeans as well and created an equivalent NetBeans Foundation. Eclipse has no technical advantage whatsoever over NetBeans at this point (frankly speaking, I think NetBeans looks more like a native Windows application than Eclipse does, despite the whole Swing vs. SWT debate). NetBeans simply needs more resources behind it to become number one in the Java IDE space, and I don't think Sun can make that happen on its own.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap