Java desktop applications - the state of the nation
As Hans has posted on his blog a few months back, "Java Swing with 47% use, has surpassed WinForms as the dominant GUI development toolkit, an increase of 27% since fall 2004". This has raised quite a few eyebrows, with the most common argument being "name one popular Java desktop application". "Not one, but two", retorted many, pointing to LimeWire and Azureus. Some even take Azureus as an example that SWT is more popular than Swing. A funny example, given that seven out of ten most downloaded projects on Sourceforge are file-sharing applications (with all three top spots all-time and all four top spots last week). I doubt that SWT guys would want to use Azureus (at least in its current UI state) to argue SWT's superiority over Swing for desktop world. Did you see the UI? It's even worse than Ocean (no offense to both sides meant). Just see this layout monstrosity:
And this hideous creature (is supposed to show you the map of the clients you're currently peering with - my eyes, my eyes ...:)
Is it me, or are these applications popular because they allow sharing illegal content quickly and freely around the globe?
The above-mentioned 47% (many of which is 90% iceberg part under the corporate intranet water) spot some great-looking apps (see Swing Sightings), but I'm sure that the majority is quick Ocean-powered UI thrown over a custom database / backend / ... and left to intranet users that don't really have a choice (you know, the deadlines and such...)
JavaOne 2005 was my first one. If i had to choose one session that i looked most forward to, it would be without doubt "Looking Good". Java client team spent few months pumping up the expectations, requesting the community to propose bland-looking apps that would be turned to sleek state-of-the-art beauties. Finally, Chet has announced that they decided to take a "common" IM client (that they actually wrote) and show how it can be spiced up. Huh? Guys? Do i need to point any further than Java's own JConsole?
It was a perfect candidate for this session a year ago, and it still is now (that's two strikes in a row and 2007 is coming...)
Not only that, the code to the application has never been released (i follow both Chet and Romain blogs, and to my best knowledge it wasn't). I understand that the original code (or at least some portions of it) was thrown together in haste to meet the deadlines. I understand that the intent was to sit down and clean it up. I understand that were other (note that i don't say more important, but i'll come to that later) issues after JavaOne. So, it remained what it was - a demo. A bunch of screenshots, a bunch of unanswered requests to post the code, a bunch of code snippets on the slides. Here, guys, it can be done. Well, we kinda know (with all the Swing Sightings).
This year has brought Aerith and (yet again) a non-existing "common" mail application beautified. Again, promises to release the code. It'll take a bit. We need to clean it up first. Well, not all of it... (Didn't you say that it is all based on available technologies?) So, one more demo. Once more a bunch of screenshots. Still more requests to post the code. Still more code snippets on the slides. Here, guys, it can be done. We just need to sit down and clean it up a bit. Ah, right, we have this Mustang beta release and the official one and tons of bugs that we need to fix. And that small SwingLabs project that takes years until its 1.0 release (did somebody say that not having stuff under JDK takes much less time?) So, my vote goes to Aerith remaining in its current state (that being demo) until the next JavaOne.
I go back to five years being an MFC programmer. Along with a bunch of other stuff including Delphi 6, Ada (oh, the horror of IBM debugger) and Java (oh, the so beautiful JBuilder 2 and 3). You know what sets Microsoft development suite apart from Java suites (that being Eclipse / NB / JDeveloper / IDEA / ...)? Four magic letters (well actually seven) - MSDN DVD. Back in 1999 i had a Visual Studio 6.0 installed along with complete version of MSDN. Not once did i have to go online to find code samples. That's what a 1.5GB of code samples give you. And those code samples come straight from the source - the Microsoft itself. Not javaalmanac, not krugle, not sun java forums (when you cross the fingers and hope that the code you just copied compiles, works and is not copyrighted). Straight from the source. You have examples that not only work, but show how it should be done. And you get it with your Visual Studio installation.
We can have all the refactoring in the world, but until Sun provides tons of well-written, thoroughly-documented and polished Swing applications (and i'm not talking about SwingSet2) and all we're going to have is architecture series that dies quicker than NBC sitcoms and a collection of concept proofs... It can take man-years to come up with anything that remotely matches the wealth of information in MSDN, but if Sun wants to compete on Windows desktop (if Sun indeed does)... Not "somewhere along the road", not "it's a mostly working application". Release the code at the same time you show the application. This is how it is done in Redmond and all its PDCs. This is how you use the momentum to its fullest while you have the attention of the developers. We want the source now, while we're appreciating the screenshots. Not after Windows Media Player 11 (which looks suspiciously like Aerith) is released (well, too late for this), not after Office 2007 dark glass theme and Vista are released (and that will be in only six months). Like Jack Bauer says Now. Like him, you don't have much time. The XAML is coming.
If you think that having the OpenGL pipeline in Mustang is enough to make people install Mustang right away on millions of computers, then you're wrong. Screenshots don't cut it in the world of translucent animation and 3D integration. We want to run the demos, to take the code, to copy it and change it to fit our needs. If you need to, pay Dell and Lenovo to have Mustang pre-installed on desktop computers. If you need to, pay hundreds of qualified Swing engineers to sit all day and make fully-working applications for Mustang that show everything we need to know. If you need to, pay all the software journals to bundle DVDs with that code with all the 2006-2007 monthly issues. Make the desktop forums, personal weblogs with code snippets and code-harvesting engines obsolete. Yes, the MSDN costs Microsoft a fortune. Ever wonder why big companies and legions of individuals are happy to pay for it? Do you think that Microsoft loses money on Visual Studio line? Still convinced that the free tools are the only way to go?
You can have hundreds that are happy to hunt down the right way to do Swing (ever wonder why only 20 third-party look-and-feels in 10 years?), but you lose hundreds of thousands that turn to Redmond pastures just because of the documentation.