Sun Microsystems has offered its first public update to the JavaFX technology it introduced last May in advance of the JavaOne conference.
The company has released a compiler for the JavaFX Script language used to create online content, which will make application code considerably faster. Sun
also announced a plug-in for its NetBeans IDE
JavaFX is Sun’s attempt to bring scripting applications down to the desktop, much in the way AJAX
The knock against AJAX applications is they are slow and don’t work in an offline world; you must have an Internet connection to the server hosting the application. With JavaFX, you can run the applications on your local computer while disconnected from the Internet. Also, because the applications are compiled instead of interpreted, they run much faster.
Previously, JavaFX Script was interpretive, which meant it had to be compiled on the fly at execution. “It’s got the same overhead of other interpretive languages, which means apps that need to be high performance tend to suffer. So we needed to create a compiler for JavaFX Script to go through the code once to create the bytecode that would run,” Chet Haase. architect in the Java Client Group at Sun told Internetnews.com.
The compiler doesn’t compile the entire application, just the non-UI related parts of the code. Haase doesn’t have performance numbers yet but said many apps, particularly graphics-heavy applications, would benefit greatly from it.
When Sun demoed JavaFX Script at JavaOne, it was running as an interpreted language, but that was a temporary situation, according to Haase. “It was transitioning from one person’s research product to a product direction, and one thing that came up was it has to be compiled because of this performance bottleneck,” he explained.
The NetBeans plug-in will make developing JavaFX Script programs in the IDE considerably easier, as now it’s a part of the IDE instead of a separate application. It will work with NetBeans 5.5 and the 6.0 release due later this year.
Haase said with this revision, the plug-in is more intelligent in how it handles code syntax and also allows developers to see their changes live in the IDE, so as they program and make changes, they can run it live within the IDE and test their new code, rather than having to save it, compile and execute it in order to test the code.
Haase said JavaFX is still on the same development trajectory as before, which means some time next year. Also getting an overhaul is Java SE 6, which will see many performance improvements in start-up and graphics displays. Haase said that was planned for release early next year.