Fri, 02 Dec 2005

NetBeans

I'm going to go out of order a bit here and describe two different NetBeans talks together, though they happened on different days. Then I'll use this as a place to discuss some interesting NetBeans-related conversations and explorations.

Charlie Hunt gave a talk titled, "NetBeans: Pushing Java Productivity". (There's that word again.) This talk was a run through of all the new NetBeans features and some future plans. Tim Boudreau gave a talk about Matisse and other things -- this talk was largely demos of some of the new things. I freely intermix stuff the two of them said here.

The new NetBeans release includes Matisse (a Swing GUI builder), new editor features for productivity, newly rewritten CVS support (no SVN yet, but planned for the near future). There is now support for JSF, Struts, and JBoss in the IDE -- Eclipse probably lags a bit here.

This revision of NetBeans looks a lot like Eclipse. Astoundingly so in some cases, for instance the editor window has a small vertical pane on the right which represents errors and warnings, exactly the way Eclipse does. I wondered whether NetBeans was copying Eclipse, or whether both of the are copying some standard-but-unknown-to-me IDE approach.

Bad News

First the bad news for NetBeans. In some important ways Eclipse remains superior. NetBeans does not have an integrated compiler. Instead it invokes ant. It does parse and understand a Java source file when you open it -- but this means that, unless you do a full compilation, you won't have a global view of all the errors in your project. When you go to run your project, NetBeans does a real compilation. Contrast this with Eclipse, where it compiles in the background, has global knowledge of your program (and can do things like mark up the project view to show which files have errors in them -- before the file is opened), and where running a test case doesn't mean that you have to wait for a rebuild. This is core stuff, directly impacting your workflow, and Eclipse is just better.

I'm told a future NetBeans will integrate with the compiler better (there is some JSR for the compiler API. This stuff scares me given what it would imply for gcjx...).

Eclipse's CVS support also looked better offhand, but I didn't play with NetBeans' myself.

Tim and I had a long talk about Classpath, NetBeans, Eclipse, Swing, and SWT. While I'm not really a fan of SWT's implementation, the simple fact is that it is open source and readily runnable with gcj. On the other hand Swing requires a major development effort, which we're still undertaking. And while we definitely plan to be able to run NetBeans, we're not there yet. And in short -- feature comparisons aside (features are in constant flux anyway) -- this is why I'm an Eclipse user and promoter.

I think it would be perfectly fine -- cool, even -- to set up Classpath and friends to build with NetBeans the same way I set them up to build with Eclipse. I gave a quick try to this at the airport, using a NetBeans CD conveniently handed out at the conference, but ran aground on a quirk (NetBeans doesn't like your source to appear in . -- which is where Classpath puts it). Bummer! (I found a number of other oddities too, like the lack of a "Save As" action -- maybe I'll be spending some quality time with their bugzilla soon.

Also it strikes me that in some ways Emacs is still the state of the art. For instance people gush endlessly about the "new" Mozilla search "non-dialog" -- umm, that is Emacs isearch. So, now NetBeans has abbrevs... yay, color me unenthused that the IDEs are catching up on basic editing skills. Ahh, I'm being excessively snarky.

Matisse

The bad news is pretty bad. However, the good news is also pretty damn good. In fact the good things in NetBeans are just amazingly awesome.

By which I mean, Matisse gives a really awesome demo. Matisse is a Swing GUI builder that plugs in to NetBeans. It purports to let you build cross-platform applications correctly. It comes with a new layout manager called GroupLayout (which, it is claimed, is open source, but I have not verified this) which handles all the details, for instance this is where information about platform-specific spacing differences is kept. It also has some nice tricks like aligning font baselines even across different widget types.

Matisse tries hard to make it easy to build sensible GUIs, but doesn't actually force you to. For instance, in the demo, as Tim dragged UI elements around, guidelines would appear showing suggested drop points. This kind of thing is very handy, he was able to create new composite widgets with proper spacing and proper resize behavior in just a couple of minutes.

I still think that Swing kind of looks like crap on Linux. It should be indistinguishable from any other application, and unfortunately that is not the case yet. This is something that Classpath can, and should, solve.

Fun quote: "you can't spend an hour on Matisse". Meaning, it is too easy to use to take up that much time.

Sharing

On stage Tim demoed something that I thought was really cool and revolutionary. NetBeans has a built-in IM client, and Tim was talking to a co-developer in the Czech Republic. Tim chose "share this project" and, over IM, the code was transferred to his colleague, who then proceeded to edit it -- and the changes showed up instantly in Tim's workspace.

This is so damn cool. I've been wanting something like this for quite a while... not every change is worth sending to version control, and sometimes you really want to use the pair-programming style. (Also it would be super great to be able to share a debug session, but I don't know if NetBeans can do that yet.) Anyway I've thought about having this in Eclipse, but NetBeans is actually already there. Amazing.

Currently you need an account on share.java.net to get this functionality. That seems smart for them, in a building-a-portal way -- and sourceforge or savannah should offer IM service like this. In combination with the Eclipse Mylar plugin this would be quite cool; for instance open a project and be available for talking with other developers from that project. They plan to look at a jxta-based implementation soon, meaning the sharing could really be P2P. I think this would be friendlier for users.

Eclipse is working on similar functionality as part of the ECF project. This is now definitely on my must-examine list, not only for shared hacking on Classpath, but also for integration with Medi8. Shared movie editing seems like a cool idea.

Other NetBeans stuff

My notes say that Charlie's talk was full of unsubtle anti-Eclipse jabs. Which it was. Come on guys, rise above.

NetBeans has an ant debugger (nice idea, didn't see a demo). It has a PDE-like thing for writing NetBeans plugins (the demo here was about the same as Bob's, making me suspect that they both chose the only easy thing). You can make rich client applications using the NetBeans base (does Gnome have this yet? I think these days I would probably pick Eclipse RCP as the base for a traditional-style application). NetBeans makes it really easy to download and install the latest LookingGlass. It seems to me that we could do this for all of Fedora, by providing a way to say "I want package X", and then fetch the SRPM and turn it into an Eclipse project. Well, except for the fact that most SRPMs are probably not really suitable for hacking inside today's Eclipse :-(

You can set background wallpaper in NetBeans. This is useless but they did ask, "Can Eclipse do this?". Seriously, come on guys.

By the way, LookingGlass gives a really nice demo. Things whirl and slide around, and pulse organically. But does it help my productivity? Or just make me reach for the motion sickness pills?

Tim hinted at scriptable refactoring coming in NetBeans. Hmm, sounds like something I wanted.

There is a J2ME plugin for NetBeans that allows debugging on the actual device you are using -- they've found the device emulators to be somewhat flaky and so debugging on a live device is more useful. This sounds pretty hand for folks in the J2ME space. Maybe I misunderstood this though, since Michael Koch tells me that not many devices actually support this.


posted at: 11:18 | path: /software/brazil | permanent link to this entry