The Awkward Relationship Between Swing and JavaFX

Tuesday, October 27th, 2009

Here’s a recent awkward interaction between a Starbucks Barista and me:

Me: I’ll take a Grande Coffee (note, I don’t actually order “just a coffee”, but I’m too embarrassed to write out the actual drink. Being forced to write “Grande” instead of “medium” is embarrassment enough — I already conceded “barista” over “employee”).
Barista: Will that be all for you today?
Me: Yep — and my name’s not “Todd”.
Barista: I’m sorry?
Me: Did you just call me Todd?  My name’s not Todd.
Barista: No…I didn’t. I asked if you wanted anything else.
Me: …Ok, my mistake. (Note: a normal person would let the misunderstanding go at this point — but not me! More awkwardness to follow!)
Barista: That will be $3.50
Me: Today! You said “today”!
Barista: I don’t–
Me: You said “will that be all ‘today’”, and I heard it as “will that be all, Todd“!
Barista: Ok, well–
Me (visibly relieved): Oh man. I sure diffused that awkward situation. What a relief.

Swing and JavaFX currently find themselves locked in a perpetual cycle of awkward exchanges and misunderstandings.

We’ve been told from the beginning that JavaFX is targeted toward media-rich social internet applications and not meant to be a replacement for Swing. We then, however, have to then reconcile that viewpoint with news like SwingX’s funding drying up and the Swing Application Framework missing the JDK 7 train (or “boat” depending on how you feel these things travel).

Feelings of anger, disbelief, and dismissiveness seem to abound in the Swing community. “Why is Sun abandoning Swing? Why are they shoving another language at us?” I admit, as a Swing developer myself, the facts on the ground look bleak for Swing.

It does seem too bad that Swing and JavaFX are in a zero-sum relationship w/r/t allocated resources and active development. It’s hard to deny that many of the high-profile Swing developers are now actively pushing hard on JavaFX.

If we look beyond that, however, I think that there is plenty of room for both technologies in the client-side Java ecosphere.

The Java Platform has always been about choice — and lots of it. Today’s Java developer has a staggering amount of choice in the realm of web frameworks, persistence frameworks, logging, collections, aspects, and dependency injection frameworks. In fact, a Java developer has so much choice, they don’t even have to program in Java if they prefer a different JVM-friendly language.

But in the realm of client-side Java, the choice has been much more limited, mostly due, I imagine, to the fact that client-side Java has never exactly been an exploding marketplace of opportunity.

Web development has always eclipsed client-side work. It’s my hope that JavaFX can seek to change some of that; that it will be able to widen the reach of client-side Java and push development back onto the desktop and remind users that not every application needs to run inside of a web browser.

Sure, it’s possible that some day JavaFX will be the “Swing Killer”, but that would be a sad and unfortunate outcome. It’s my hope that JavaFX and Swing are playing a nonzero-sum game and that the world of client-side Java is big enough for both.

Tags: , ,

Leave a Reply