BT

Sun CTO Bob Brewin on JavaFX Mobile and JavaFX Script

by David Beers on May 10, 2007 |

On this first day of JavaOne Sun displayed a renewed focus on client Java with the announcement of JavaFX. JavaFX is a complete runtime environment built on Java technology for delivering Rich Internet Applications (RIAs) to the desktop, mobile devices, handsets, and TVs. On each of these hardware platforms this new technology provides a scripting language designed expressly for rapid development of applications that combine the power of Java with flashy, interactive graphical user interfaces. But there is more to JavaFX than first meets the eye and it represents a remarkable new business strategy for Sun, as well as a new technology frontier. InfoQ got the chance to chat about this with Bob Brewin, Sun's Chief Technology Officer, who filled in some of the blanks about what it means to Sun, to Java developers, and to consumers, who are the real focus of JavaFX.

Asked what drove Sun to bring this technology to market at this time, Brewin didn't come back with the answer that many might have expected concerning the need for richer, faster-to-develop web content on the desktop. While it's pretty evident that JavaFX is an answer to the growth of Flash and AJAX, Brewin said the mobile phone and the TV screen are "closer to the user" than the desktop browser, and that in his mind these were the most important drivers of JavaFX. This echoed the morning's keynote message that Sun is placing new focus on consumer products in order to reach the widest possible market for Java technology. Brewin pointed out that in most of the world the primary means of accessing Internet content is not the desktop computer, but the mobile phone.

JavaFX is built variously on top of Java SE or Java ME depending on the target hardware platform, but in the Mobile version it is much more that a productive scripting interface for authoring interactive content—it is a complete operating system for the device, including a Linux kernel and native services. It should be seen as a competitor to Windows Mobile, Symbian OS, and other mobile Linux platforms. When running on a mobile phone JavaFX Mobile implements telephony services in Java that would be native in most mobile phones, so in this respect you can see its pedigree in the technology Sun recently acquired from SavaJe. The Linux kernel and CDC Personal Basis Profile Java runtime target high-end smartphone-class handsets as well as TVs and other connected devices, but Brewin says that as the runtime is optimized and perfected Sun will drive it down into CLDC MIDP "feature phones" as well. While the whole JavaFX software stack will be open-sourced soon, Sun expects to increase licensing revenue by selling complete device platforms instead of just Java runtime environments. A number of projects are in the works, including even a Solaris kernel for ARM processors found in most mobile devices today.

Asked about the genesis of JavaFX Script, Brewin noted that the language for scripting interactive GUIs was developed by Sun engineer Chris Oliver when he was at SeeBeyond Technology Corporation, which Sun acquired in 2005. Some developers will be familiar with it under its original name, F3. JavaFX Script is statically typed and provides compile-time error-checking, making it possible to develop powerful tooling with support for code-complete, hyperlinking, refactoring, etc. Other language features include type-inference, declarative syntax, and automatic data-binding with full support for 2D graphics and standard Swing components as well as declarative animation. You can also import java classes, create new Java objects, call their methods, and implement Java interfaces.

Authoring tools are still in development, but during the Tuesday keynote Chris demonstrated an interactive GUI builder for JavaFX Scripting that he had developed in JavaFX Script. This tool is included in the initial release of JavaFX to the developer community. The scripting language and tools are essentially the same across all the target platforms, so JavaFX seems to deliver on Sun's "write once, run anywhere" promise even better than Java itself. Of course, the Java objects that are imported and called within a JavaFX script will be dependent on the available Java runtime. When JavaFX is released for CLDC devices that have limited resources and lack Swing or AGUI libraries it will necessarily need to be somewhat pared down.

One concern about JavaFX on the desktop is the deployment story. The JRE is a huge download for a user that doesn't already have it installed and the current user experience for on-demand installation from the browser is not very good. Brewin fleshed out remarks made during the keynote to the effect that Java 6 Update 2 will introduce a new deployment model for the JRE where the initial download is very small and additional JRE components are lazily downloaded only as needed. He said that the concept is very similar to the Java Kernel project proposed for Java 7. Asked if a similar deployment scenario might be implemented for Java ME, he said it was certainly possible and that naturally this would be driven by the Java Community Process.

Asked how he would compare JavaFX to Adobe Flash, Brewin responded that it was a bit of an "apples and oranges" comparison. Flash clearly has the tooling end of things down, but was never intended to deliver the vast capabilities of the Java class libraries that are under the hood of JavaFX. He said the better comparison was between JavaFX and Apollo, Adobe's upcoming runtime for desktop RIAs. And on that playing field he thinks JavaFX will be very competitive.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Why JavaFX Mobile is not as good news as you think by David Beers

Since InfoQ focuses on the enterprise and JavaFX Mobile is more of a consumer market play I didn't go into full detail on the mobile member of the JavaFX family and Brewin's remarks about it. If you're interested (particularly if you rose to the bait of the iPhone-like iCandy that was in copious supply during the keynote) you can read a little more here.

Adobe already has the technology for the desktop/web by Michel Löhr

Compare JavaFX to Adobe Flex2 (Flex3 is coming) which is already a fairly mature technology together with an Eclipse base Dev/Debugging environment. Flex can be brought to the desktop by Apollo. Microsoft is already working on Silverlight. So Sun is not that fast in delivering a solution for this 'new' RIA platform.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT