Saturday, September 01, 2012

JavaFX 2 for 2012 and beyond

I haven't posted to this blog in a while but I found a very interesting topic that just would not fit into the microBlogging format of the social media networks (Google+, Twitter), JavaFX 2.

A couple of days ago there were was an interesting article that caught my eye about JavaFX and Game development at Java Code Geeks, JavaFX 2 Game Tutorial Part 5.  After reading it, I spent some time researching JavaFX and learned that version 2 is now pure Java (not JavaFX Script), I see that JavaFX is beginning to gain mindshare and traction for rich client applications and rich internet applications (RIA).


Up to this point in time since JavaFX 1 was released back in 2007, it was just a bunch of background noise in the rich internet client/Java ecosystem. I mostly ignored JavaFX 1 after discovering that it is implemented in yet another scripting language, JavaFX Script. We already have Javascript, ActionScript, and HTML5 which all used some derivative of Javascript. So it made no sense to me to learn yet another scripting language.


JavaFX 2 was released in Oct 2011 with the its signficant change being it is now a 100% Java API.  I was not aware of this until a few days ago... again, background noise in the Java universe.  JavaFX 2.1 was released in April 2012.  The latest release, JavaFX 2.2 was released in August 2012, see What’s new in JavaFX 2.2.


JavaFX 2 is an integral API of Java 7 and is available as a runtime or SDK for Java 6 only on Windows. This in interesting. If you read between the lines of the Oracle JavaFX announcement, they want you to upgrade to Java 7 anyway so this is one hook to get developers to make the move.

After reading the 5 parts of the JavaFX Game Tutorial 6-part series, what is even more interesting is the JavaFX vs. HTML5 for RIA article published in May 201 providing a compelling argument for adopting JavaFX 2 for RIA applications in 2012 and beyond.  It provides a brief comparision with HTML5, Adobe Flash/Flex, Siverlight, and other Java web frameworks supporting RIA.


Now back to JavaFX, a good starting point in the JavaFX path  is the Hello JavaFX 2.0: Introduction by Command Line.

So why even look at JavaFX?  It is most likely the successor to Swing.  It goes above and beyond what Swing offers supporting multi-touch, forthcoming mobile support (iOS, Android), and Rich Client and Rich Internet platforms. This is discussed in more detail in the Integrating JavaFX and Swing article.