A Snapshot of the JavaFX World
By reckstei on Jan 10, 2008
Now, I should point out that JavaFX Script is still a moving target, so the final technology is still up for grabs. However, Inyoung started by talking about the rise of scripting languages with the latest generation of programmers, largely (and I agree) because they are rapid development environments. However, one of her key points was that there are different scripting languages for different purposes, of which JavaFX is one. JavaFX is dedicated to rich client interfaces.
Note that if you download the JavaFX libraries right now, you'll get a scripting interpreter. Scripting support was introduced back in JDK 1.5, but Sun is currently working on a compiler for JavaFX so that the language can be compiled directly into bytecode, which will make the resulting GUI programs much faster. In addition, she mentioned that the designer tools are currently being worked on by Sun, similar to what you might get with Flash tools.
Since I'm a techie guy, I was very interested in hearing about the new Scene Graph. This part of the javaFX architecture forms the “guts” of any animation. In simple terms, a scene graph keeps track of each of the objects that will be displayed, or “painted,” in a scene. However, since JavaFX is largely about animation, the scene graph must keep track of each of the graphical objects so that it can animate those objects over time. You can think of it as a big clipboard that keeps track of all the items that are shown on the screen over an animation.
Now, I should point out that one of the key ideas behind JavaFX is that there are two different types of developers: one who is a visual designer, and another who is a programmer. The workflow output of both of these can be used to create a rich client platform (it's unusual to have both done by the same person). However, JavaFX helps both get the job done. The workflow allows content to be compiled and distributed with a runtime on a variety of platforms, from desktops to Blu-Ray disc players, to mobile phones and TV platforms.
From there, Inyoung hinted on a number of features, including my favorite: automatic data binding using the “bind” keyword. Data binding keeps two variables in sync, such that when one changes, the other is changes as well. For those of you that use model-view-controller (MVC) design pattern, you'll recognize that automatic binding is a feature worth its weight in gold. In JavaFX, you'll often be using model classes and view classes that must remain in sync.
Of course, the underlying technology of JavaFX is the Swing and Java 2D libraries. If you haven't used the 2D libraries lately, you'll be in for a shock (a pleasant one, incidentally). Most of the features that animations depend on, such as translation, opacity, and timing, have been simplified for use in JavaFX, although those features are still in active development.
All in all, a great presentation, highlighting some of the great new features in JavaFX. I also appreciated the detailed examples on how to invoke JavaFX script from within Java.