Programmer Productivity, JSF, and NetBeans
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.
- Refactor -> Rename
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.
(To see the image in glorious detail, right-click and select "View Image".)
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.
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
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 href="http://www.oracle.com/technology//products/jdev/info/rdebugwp/rdebugwp.html">this
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 href="https://glassfishplugins.dev.java.net/download/">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
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
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 href="http://www.netbeans.org/community/releases/55/">NetBeans 5.5 a