Delusion-Free Desktop Java
Ted Neward's 2006 Tech Predictions are a fun read, starting off with predicting the fading of AJAX hype, and later predicting the almost inevitable letdown as Ruby's balloon deflates. They're still good technologies of course, but right now, they're both at that "Java in 1997" stage, which means they're pissing a lot of people off, especially Java developers.
Along with some other nuggets for the Java community about EJB 3.0 and the path to Dolphin (Java SE 7), Neward drops this little nugget.
Problem is, the periodic prognostications of Desktop Java's resurgence remind me too much of the oft-predicted rise of the Linux Desktop. Both are based on a mix of sound reasoning and wishful thinking, and when they consistently fail to come true, it reminds us that there's still too much of the latter and not enough of the former.
The reasons for Desktop Java's potential success are still there: even with AJAX, the web experience can only take you so far. With media apps becoming increasingly significant, something that browsers aren't well suited for, Java has yet another opportunity (pity, then, that the official Java media API's suck so bad). The story of a single executable providing a rich client across platforms is still compelling, particularly to those on platforms that get left out in the usual "available now for Windows, Mac later maybe, and Lin-what?" announcements.
But those reasons have always been true, and somehow, they've apparently never been compelling enough. Well, not in the public realm. All the Desktop Java developers I know work in the enterprise, generally distributing their work only within a single company. This makes it really hard to get a sense of just how big or small the Desktop Java community is. It was certainly surprising, for example, that Swing Hacks was the #2 seller at the JavaOne bookstore last summer. Nobody, authors included, really thought there were still that many people in the Desktop Java realm.
In other words, take away GMail and Google Maps, and 1/3 of the discussion about AJAX goes away.
A modest proposal
So, imagine this: what if Google started writing Java apps? Imagine if they started with Google Earth, the drool-worthy 3D map interface that all the Mac and Linux zealots have been begging for? What if they started doing some of their other rich clients in Java? As Google has become a (the?) standard-bearer for internet applications, able to legitimize a technology like AJAX by adopting it, this would be huge for Java.
Why, it's enough to make Sun get together with Google. Except that, um, wait, they already did. And announced that... dramatic pause... Sun would be distributing the Google Toolbar as an optional include with the JRE download.
Pause for the unique combination of incredulous laughter and heartbreak.
I don't know what Sun could offer Google to get them to sling some Java magic -- Google probably already has enough money and Sun probably doesn't have much left -- but just as a technical challenge, it seems like something that would be up the Google engineers' alley.
Setting aside what, ultimately, may simply be a pipe-dream of Google as a white knight, riding to Desktop Java's rescue, there are a couple things I think the Desktop Java advocates could for themselves do to help their cause.
First and foremost: end the insane "pixel accuracy" arms race. Java apps don't have to look exactly like native apps to succeed. None of these wonderful web apps are particularly Windows-like or Mac-like, and they're quite successful.
The "doesn't look native enough" line is about as useful a critique as the famous "too many notes" line in Amadeus. It's an insincere slap from people who typically either a) would never accept Java for political reasons, or b) don't know what they're talking about. (b) is usually your boss -- I've worked for him too -- who doesn't see the value of your software (or, in some cases, accurately realizes your software doesn't have any value) but perceives only the surface gloss and not the underlying functionality. There's a solution for this: sometimes, for the sake of yourself, your company, and your profession, you really need to tell the boss to shut the f**k up.
Pixel-accuracy has led to a miserable fool's errand for both of the major Java GUI toolkits, Swing and SWT. Being rather coupled to the native Windows API's, SWT should enjoy a huge advantage here, but its obsessive fidelity to Windows' GUI shows no signs of ushering in a new era of Java Desktop development... just a lot of very loud evangelists, and complaints about its performance on other platforms. Swing, despite its bulk and sometimes ruefully ornate design, is probably better suited for the long run, because its goals are ultimately based in functionality, not appearance.
The missing pieces
I think there are two desperately needed pieces to the Java Desktop puzzle. We can muddle by without them, but fixing them would get some fresh eyes on this space.
Will fixing these magically usher in a new age of Java Desktop development. No, I doubt they're a big enough deal unto themselves for that. But they're so obviously broken now, that they should be the top candidates for new focus and serious development. The first and maybe the second could probably be done with or without Sun's involvement, by an open source project (or competing projects), given the right mix of inspiration, vision, and effort.
Or maybe this is just more wishful thinking.
Chris Adamson is an author, editor, and developer specializing in iPhone and Mac.