Steve On Java

Hacking Java, JavaFX, and Flash with Agility
  • rss
  • Home
  • NightHacking Tour
    • [Archive] NightHacking Europe – The Road to Devoxx
  • SvJugFX
  • JFXtras
    • JFXtras Individual CLA
    • JFXtras Corporate CLA
  • 2013 Travel Map
    • Let’s Meetup!
    • 2012 Travel Map
  • Contact

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:

JavaFX Your Way: Building JavaFX Applications with Alternative Languages

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.

HTML5 Support

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.

.

The Casualties:

JavaFX Script

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

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.

.

What’s Next?

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.

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Categories
Announcements, JavaFX, JavaFX Mobile, Presentation, SvJugFx
Tags
clojure, groovy, java, JavaFX, javafx 2.0, javaone, ruby, scala
Comments rss
Comments rss
Trackback
Trackback

« JavaOne Expert RIA Track JavaOne Enterprise JavaFX and JFXtras Presentations »

18 Responses to “JavaFX 2.0 (a.k.a. What Just Happened to JavaFX Script?)”

  1. William Antônio Siqueira says:
    September 21, 2010 at 7:01 am

    Thanks for this post Stephen :) .

    Even everybody thinking the inverse, I liked the changes.

    The sad thing is we need to wait a big time to start JavaFX coding again =/

    Reply
  2. Chad Salamon says:
    September 21, 2010 at 10:46 am

    Well that is good news and depressing at the same time. In the future I imagine this will be good all around – especially if they OS the language and the community is able to develop it to support JavaFX 2.0. However, in the meantime it sounds like the current platform for JavaFX is facing at least a short term obsolescence, and there is as of yet no platform to replace it. Anybody invested in JavaFX right now would seem to be put on hold. Is that true?

    I hope that Steve’s announcements will shed some light on this.

    Reply
  3. Javawerks says:
    September 21, 2010 at 12:31 pm

    It really feels like a ‘here we go again moment’, hoping that Oracle will follow through. Given the track record of JavaFx, we’ll be lucky to see JavaFx 2.0 next winter, a very long 15 months out. And when you consider Java is not really a player in the mobile space, less the Android and JME debacles, it’s a double bummer. That said, I like the new direction taken by Oracle with JavaFx and Swing. With so much division in the UI space, there’s always a chance that JavaFx may succeed, especially with support for other popular JVM langauges . I suspect Swing and AWT, though, will slowly fade away, not necessarily a bad thing given their age.

    Reply
  4. Brian Zhao says:
    September 21, 2010 at 4:03 pm

    Support Stephen and Jfxtras to continue javafx script! JavaFx 2.0 is too far from us.

    Reply
  5. Cay Horstmann says:
    September 22, 2010 at 12:53 am

    Do we know how this JavaFX will be distributed? Is it a part of Java SE? An add-on? If so, how is it licensed? How will it get on users’ desktops?

    Thanks,

    Cay

    Reply
  6. Chad Salamon says:
    September 23, 2010 at 6:36 am

    Any updates yet?

    Reply
  7. Steve On Java » JavaOne Enterprise JavaFX and JFXtras Presentations says:
    September 26, 2010 at 3:09 am

    [...] Speaking at JavaOne was challenging, but fun this year. With the surprise announcements about JavaFX 2.0 there wasn’t a lot of time to respond, but I managed to refocus all my talks in a very short [...]

    Reply
  8. ichigo says:
    September 26, 2010 at 11:32 pm

    i am a bit lost here.

    I started developing on JavaFX 1.3. What will happen to the FX scripts that are written when the new JavaFX 2.0 arrived? How can i migrate from 1.3 to 2.0? Or some kind souls are already working on the open javafx script compiler :)

    Reply
    • steveonjava says:
      September 27, 2010 at 6:33 am

      I cannot speak to how easy or hard a migration to JavaFX 2.0 will be (this depends a lot on the new APIs that Oracle is working on, and whether or not they provide a migration tool).

      For keeping the JavaFX Script language alive, see my most recent blog post (particularly the parts about Visage): http://steveonjava.com/javaone-enterprise-javafx-and-jfxtras-presentations/

      Reply
  9. ichigo says:
    September 27, 2010 at 10:06 pm

    Thanks steve, i look forward to Visage release. There is still hope for those who dive into javafx script :)

    Reply
  10. Harry Levinson says:
    October 7, 2010 at 4:16 pm

    Steve (et al.),

    What do you recommend as a choice for GUI work on a brand new Java project?

    My app will start out 100% on a Windows desktop, but likely will need to run as an applet (99% sure primarily in browsers on Windows).

    Should I use Swing or JavaFX or something else?

    thanks
    Harry

    Reply
    • steveonjava says:
      October 7, 2010 at 8:33 pm

      I definitely can’t recommend Swing, because it is not a go forward UI toolkit for Java.

      I would like to recommend JavaFX, but with the pending language change there is a fair amount of risk that you will need to rework your application to run with JavaFX 2.0.

      There closest other option is Apache Pivot. It also runs on the JRE, but has much more active development than Swing.

      Reply
      • steveonjava says:
        October 14, 2010 at 2:11 pm

        Reply from softwarevisualization:
        (reposted by me, because the spam filter kicked it back)

        I can recommend Swing. I am not sure what :”no go forward” means, but it’s definitely here to stay on the desktop at least.

        Keep in mind that the new UI toolkits like the one that will be in JavaFX are meant to address a certain kind of UI, one that represents the future of UIs such as the kind displayed in the iDevices There are still lots of things that need “regular” UIs such as those found in Netbeans and IntelliJ.

        If you’re writing an application with a UI like IntelliJ or Netbean’s , then Swing is your best friend, not least of which is because all Java applications will be able to utilize JavaFX libraries, including the whatever UI components there are. So if you build your application with a clean divide between the model and the UI, in the future you’ll only have to change the UI part of it and then only if you want to.

        Swing rocks. If you read the book Filthy Rich Clients, you’ll see that you can really do a virtually anything you can conceive of using just Swing and Java2D.

        If you wanted to, you could create your own “future UI” toolkit using just Java2D and Swing.

        The only reason that might be a bad idea is because you’d fundamentally be competing with what the JavaFX team are doing right now.

        Probably, they’ll do it better. Probably, theirs will integrate in special ways with Netbeans. Certainly, more people will be around that can program to theirs than can program to yours.

        But you could do it.

        Swing is a fantastic library and very many great applications have been and will be built on it.. It’s also the only game in town right now if you want a WORA application that deals in any real way with text.

    • polypus74 says:
      October 11, 2010 at 12:04 pm

      > I would like to recommend JavaFX, but with the pending language change there is a fair amount of risk that you will
      > need to rework your application to run with JavaFX 2.0.

      if oracle ever delivers, and then even if they do, you will be bound to prism, a closed source rendering pipeline. i for one don’t want to be at oracle’s mercy.

      > There closest other option is Apache Pivot.

      aside from pivot, piccolo2d and zvtm are pretty cool projects, but they represent an entirely new paradigm of thinking about guis which i’m still trying to get my head around. they’re both worth a look though, imho.

      Reply
  11. Naoufel says:
    October 31, 2010 at 9:26 am

    I liked these changes.
    I think htis as an alternative for Swing + abilities to draw shapes and embedd HTML5 + CSS.
    Good job for JavaFX 2.0 team.
    I wait for it…………………………………

    Reply
  12. Harry Levinson says:
    December 2, 2010 at 2:58 pm

    Thought I’d come back and give people an update…

    I’ve been using Java 6 with Swing on two desktop projects for the last couple of months now, since I posted my question.

    In both cases it worked out very well. On one small reporting project I used Eclipse 3.5 with hand-coded Swing code for a small number of forms. On the other project, which has many forms, I am (so far) using NetBeans 6.9.1 and building forms with the GUI toolbox.

    So far with NetBeans I’ve been able to create any page I needed. Have only encountered a few minor quirks with the GUI tools, not nearly enough to abandon it on that basis alone. Now that my project is getting bigger, it feels a bit sluggish to edit code. Eclipse’s editor seems a bit better, but perhaps if I break up the NetBeans project it will be more responsive. (FYI I’m using a 5-yr old ThinkPad that does need to be replaced.)

    I did a demo of the NetBeans app for the client, and explained that I’d decided to go with Swing because of its maturity, stability, and sufficient features to cover our needs. They were happy with that choice and didn’t mention any GUI needs that would push us away from Swing. They also liked the demo very much.

    Reply
    • steveonjava says:
      December 2, 2010 at 11:43 pm

      Harry,

      I am glad things worked out. Thanks for posting your experience here!

      Reply
  13. Hrvoje says:
    December 6, 2010 at 3:02 am

    Would be any changes with Clipboard? Eg. clipboard change listener, read from Clipboard and set to clipboard different MIME types at the same time? …

    Reply

Leave a Reply

Click here to cancel reply.

  • Travel Map - Let's Meetup

Publications

  

Affiliations

Awards

2009/2011 JavaOne Rock Star!

Disclaimer

Views and opinions expressed here are all my fault... complain to me, not my employer. :)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.