JavaFX 2.0 (a.k.a. What Just Happened to JavaFX Script?)steveonjava | September 21, 2010
There were some huge announcements at JavaOne today for the JavaFX platform. Overall I think the announcements show some very positive momentum for the future of JavaFX and rich client Java, but there were some casualties…
In this blog I will cover the salient bits, but if you would like an opportunity to hear it directly from the JavaFX leadership team in a free event, we will be hosting a JavaFX 2.0 event with Richard Bair and Jai Suri at our next SvJugFX meeting. As usual, the event will be streamed live, and questions can be asked remotely via Google Moderator.
The Good Parts:
Java and Alternative JVM Languages
JavaFX has a new API face. All the JavaFX 2.0 APIs will be exposed via Java classes that will make it much easier to integrate Java server and client code. This also opens up some huge possibilities for JVM language integration with JavaFX that Jonathan Giles and I explored in our JavaOne talk today. We did a whirlwind tour through four different JVM languages (Ruby, Clojure, Groovy, and Scala) showing what JavaFX 2.0 code may look like when ported to these different languages.
Here is the full presentation deck:
Which can also be downloaded as a PDF.
Open Source Controls
Thomas Kurian announced a strategy to open source the JavaFX controls going forward. This is a huge move in the right direction for the platform, and will make life for us third-party control developers much better! Even though this is not the full platform open sourcing that I have been petitioning for (thanks for all your support!!!), I will still take some of the credit.
JavaFX 2.0 Proposed Roadmap
Oracle has published a proposed roadmap for JavaFX 2.0 in the 2011 timeframe. There are some really great things included, many of which I have been campaigning for:
- Multithreading Improvements – The move to Java APIs breaks down some of the barriers to multi-threaded programming that were present with JavaFX. Presumably a similar model to Swing will exist where you can launch worker threads, but still have to do all UI operations on a main event thread.
- Texture Paint – Interesting to see this highlighted, but its use in JavaFX was pioneered by Jeff Friesen and included in JFXtras 0.7.
- Grid Layout Container + CSS – Very good to see that they are taking the Grid Layout and evolving it. The addition of making it accessible from CSS will make it an extremely powerful layout container suitable for multiple uses.
- HD Media – Media seems to be getting a big upgrade, which has been long overdue. This is in addition to other promised improvements in full screen capabilities, media markers, animation synchronization, and low latency audio.
- HTML5 WebView – It is good to see that this is finally getting the attention it deserves. JavaFX is great for dynamic application development, but is not well suited for content presentation. The combination of JavaFX + HTML5 will greatly expand the range of applications that can be developed.
- Controls Galore! – TableView, SplitView, TabView, and Rich Text to name a few. This is a necessity to build robust enterprise applications.
- File (and other) Dialogs – This may seem like a minor point, but is incredibly important for building real applications.
Not to be confused with the WebView, there is also a plan for the successor to JavaFX 2.0 (2012 timeframe) to support an alternate HTML5 rendering pipeline. Not many details are available about this yet, but it could be a huge technological breakthrough if they are able to pull it off successfully. The practical applications of being able to deploy your JavaFX application to any HTML5 compliant device is enormous.
JavaFX Script was good to us, but it is no longer a go forward technology for Oracle. I am a bit disappointed about this move, because it takes away a lot of the productivity benefits that have made JavaFX code a joy to write. However, many of the promised improvements in JavaFX 2.0 are around language features of JavaFX Script (such as binding and sequences), so hopefully they can maintain some of the benefits.
Richard Bair added a very insightful post on his blog, which goes into more details on the language changes and is well worth a read.
JavaFX Mobile has not seen a lot of action since JavaOne 2009 and the mobile focus in the keynote was on JavaME and LWUIT. I am still a big fan of the “write once, run anywhere” mantra, and am waiting for this to return to the mobile space. With the proliferation of different mobile programming models (Android, iPhone, WebOS, etc.), whoever solves the mobile cross-platform development problem in a technically solid way will profit immensely.
Now that Oracle is done with their announcements, I have some of my own. If you are at JavaOne, drop by my Wednesday session entitled “JFXtras: JavaFX Controls, Layouts, Services, and More” at 2:15 to hear it firsthand, or wait for my blog post shortly following that.