InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Sun CTO Bob Brewin on JavaFX Mobile and JavaFX Script

Posted by David Beers on May 10, 2007

Sections
Development
Topics
Java ,
Scripting
Tags
JavaFX Mobile ,
JavaFX Script

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.

Why JavaFX Mobile is not as good news as you think by David Beers Posted
Adobe already has the technology for the desktop/web by Michel Löhr Posted
  1. Back to top

    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.

  2. Back to top

    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.

Educational Content

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?