2

JavaFX 2.0 – First Impressions.

Posted by Steven Herod on Mar 6, 2011 in Uncategorized

A bit of history

I got involved with JavaFX the week of the 1.0 General Availability release in… November 2008?  That week I started work on Twitt3rFX, a JavaFX based Twitter client.  It was hard going with 1.0, performance was poor, tooling was poor, and the overall functionality of JavaFX was low, I needed to build my own scrolling views for instance, and spent a great deal of time trying to get performance acceptable.

I struggled on for nearly a year and by the time I effectively abandoned my effort I was convinced of two things.  One, I really need to re-write it :) and two, JavaFX 1.x wasn’t ready for primetime.  I was happy with a my own hobbiest efforts, but if my employer had looked me in the eye and said ‘Hey, we’re going to spend xx dollars basing our new platform on JavaFX’ I would have taken them to one side and tried to talk them out of it.

So, with that background… what do I think of the new JavaFX 2.0 EA?

First impressions of 2.0

This is the first release of the Java based version of JavaFX and  the abandonment of JavaFX Script, the programming language around which JavaFX based, and I must say, I think dumping the scripting language was a great idea.

Whilst JavaFX Script had some unique features – native support for closures for one, it definitely had its flaws.  Tooling support wasn’t anywhere near as sophisticated (or reliable) as the support Java has, you were tied to Netbeans – and there was little if any integration with Swing. Even integrating with normal Java libraries wasn’t perfect.

That all said, I think moving back to Java has been a great decision.  I’m currently working in IntelliJ community edition, and the power I get from a real IDE more than makes up for the loss of expressiveness in the language.

With one exception… the lack of closures in Java.  I’ve never written so many anonymous inner classes in my life :)

What’s in the box

My fear about JavaFX 2.0 was that it was going to reset functionality back to 1.0 levels (but in Java).  Luckily, this fear has been unfounded,  JavaFX is control (and layout) rich.  I’ve personally used Grid, VBox, Flow, Hbox layouts, and the Listview, Popup menu, Menu Button, Hyperlink, Text, Tree Pane, Tab Pane and the near mythical Web Pane (Which is a WebKit based Web view) and for the most part, they are working as intended.

I’d put a screenshot, but it looks god awful at the moment and not ready for public consumption.

I haven’t delved into animations, effects or CSS styling yet as I’ve been focusing on functionality and  application structure, but for an Early Access, I’m impressed with the work the JavaFX team has put in already, and I’m looking forward to following its progress over the coming months.

 

Copyright © 2012 Fumbling Forward All rights reserved. Theme by Laptop Geek.