Programmer Productivity, JSF, and NetBeans

My first impression using NetBeans 5.5 for JSF 1.2 development: Not easy on the eyes, but the debugger, HTTP monitor, and GlassFish integration dramatically increased my productivity.

Several years ago, I switched from Emacs to Eclipse. It was a bit painful at first, but Eclipse had two killer features that, once I discovered them, I could not live without.

I have since come to love Eclipse for many other features, small and large, but those were the ones that made me switch. The instant productivity gain was worth the pain of switching.

I now do a lot more server-side programming, with JSF as the presentation technology. But I am not a happy programmer—I feel unproductive because I always get the Stack Trace From Hell.


At JavaOne 2006, I saw all the snazzy NetBeans demos, and I did what I did after every JavaOne: Download and install NetBeans (or Forte or Sun Studio or whatever it is called in a given year), try out the demo, wince, and uninstall. But this year, something funny happened on the way to the forum. I loaded a JSF app into NetBeans (not as painful as it used to be), configured GlassFish (ridiculously easy...) and ran the app. I noticed the Run -> Debug Main Project menu. I tried it, fully expecting it to fail. But there I was, with my app stopped at a breakpoint in a managed bean. Hmmm.


This time I didn't uninstall NetBeans. A few days later, back in Eclipse and Ant, I got another STFH. An hour of headscratching, inserting logging statements, redeploying, and poring over the logs brought no enlightenment. In desperation, I fired up NetBeans and used the debugger to step through my broken component renderer code. Five minutes later I had the bug fixed.

Then I fixed the next bug in five minutes, using the nifty HTTP monitor:


I was actually being productive.

Can I do all that in Eclipse? Well, maybe. I asked on the GlassFish forum, and the only answer I got was a pointer to this article. Hmmm.

There is a JSF plugin that's pre-0.5 and requires WTF 1.5 and a whole army of subsidiary plugins, and an experimental GlassFish plugin that requires WTF 1.0. I tried installing that and hosed my Eclipse installation. Note to self: Try this in a separate Eclipse sandbox next time.

I stuck with NetBeans for the remainder of my project. It isn't as slick as Eclipse and it looks positively hideous--look at the four (!) kinds of tabs in the preceding screenshot.


My eyes hurt, but I was more productive. I discovered other nifty features. Autocompletion in JSF pages works pretty well, probably as well as it can ever work, given the dynamic nature of the EL. Running the verifier inside NetBeans is less tedious than from the command line, so I did it more often. All this upfront checking meant fewer occurrences of the STFH.

If you know a working Eclipse plugin or an inexpensive Eclipse derivative that supports JSF 1.2 with autocompletion, debugging, HTTP monitor, etc., I'd love to know. If you don't, give NetBeans 5.5 a try.