JavaFX: The Future of Client Java

On yet another balmy, gorgeous and now officially Fall day (I think) in Sydney, Sun’s Josh Marinacci and Jim
Weaver
, an independent JavaFX consultant and founder of the Java consulting company, jMentor, gave an absorbing
presentation on JavaFX at their tech days session, "A Rich Application Platform: JavaFX."

Josh is an impressive developer who I interviewed in August of 2006 for java.sun.com’s “Meet the Engineer” series. He’s
made valuable contributions in Swing, NetBeans and JavaFX tools, and is the author
(with Chris Adamson) of Swing Hacks published by O’Reilly.
 
When I interviewed Josh in 2006, he told a great story about demonstrating Aerith, a road-trip slide-show application:  “When we demoed the Aerith application for Jim Gosling to include in his JavaOne conference keynote, he was very impressed. He said to give serious props (proper respect) to whoever built the mapping component, which is the part of Aerith I had focused on. I nervously said it was me. Jim said, ‘That's worth a dollar,’ and actually took a dollar out of his wallet and handed it to me! To have Jim Gosling, one of the inventors of the Java language, give me a dollar is worth more to me than any accolades from the press. We now have that dollar, signed and framed, hanging on the wall of the Swing team's common room.”
 
Josh, who has been applying his gifts to JavaFX tools of late, presented most of the
session until the end when Jim Weaver came on stage to offer a demo. I’ve been a bit confused about what’s happening lately with Java SE and ME. Gosling has been saying for some time that they would eventually converge. JavaFX Script, Gosling has noted, is unlike other scripting languages in that it is oriented not towards creating web pages but livelier, highly animated interfaces, in particular in those parts of the world where a cell phone functions as a desktop computer. I can recall hearing about farmers in India who have only cell phones and rely on them to get weather information to guide their farming. It’s enhancing agricultural production. It’s increasingly common for people to access the web through mobile devices. JavaFX technologies are intended to be compatible with Java ME whenever possible and to coexist on the same device, so a mobile phone running JavaFX APIs would be able to run Java ME apps as well.
 
The session helped put JavaFX in a clearer perspective. JavaFX was announced at the 2007 JavaOne Conference as a family of products, technologies and tools based in Java SE – not Java ME -- and targeted for consumers. It seemed more like a promissory note than a reality at the time. Josh and Jim spoke of JavaFX as part of an attempt to prepare Java for the next decade. The past decade has been one characterized by a proliferation of client desktop apps. Java ME was released in the late 90s.

We now have:

1.8 billion cell phones

5 billion devices,

7 million set top boxes

4 million developers creating software for these devices.
 
Roughly two thirds of new PCs have Java pre-installed; 91% of PC’s – 540 million have
Java; 77% of PCs have Sun’s Java; and there are 50 million Win JRE downloads. Client Java today with Java SE 6 is the best ever. Devices keep getting more powerful and sophisticated. There is improved look and feel for Windows and Linux operating systems, better startup and execution, and a host of graphics improvements.
 
JavaFX consists of:
 
JavaFX Mobile

•JavaSE 6 Update N  (Note: If I heard correctly, Josh said the actual number is to be determined so he's calling it “N” or “10” for now.)

•Designer Tools

•Developer Tools
 
JavaFX Mobile
 
JavaFX Mobile is the first in a line of systems designed to bring Java SE to everyone, with a desktop-scaled operating environment for phones. Like desktop operating systems, it will have the same JavaFX OS on all phones. But it would still run existing Java ME applications, plus new apps written using Java SE APIs. So Java FX script can be used both to write applications or any other JVM language.

New client Java projects are hosted on the Java desktop site. Their basic message: Java technology has been massively successful on servers, cell phones, and in enterprise computing – it’s time to create success on the desktop. But: desktop Java needs to be faster, quicker to download, easier to install --- and it should be easier to create great looking and feeling applications.
 
Mobile Java has suffered from device fragmentation, weak native access, old APIs. It needs unified APIs, advanced graphics, animation, tools for designers and developers, and speed. They went on to detail a vision of a new installer, a better quickstart, a Java deployment toolkit, and more…
 

JavaFX Script
 
The session turned to open source JavaFX Script, which is designed to enable developers to create great looking Java apps. It’s designed for creative professionals so designers can build and deploy on Java and be more productive with Java SE. The mention of another scripting language seems to be wearying for some developers. Java Champion Cay Horstmann
remarked in an interview recently: “I think it's great that people come up with new programming languages for research purposes. But these languages ought to die a quick death. What is the point of having Python and Groovy and Ruby and PHP and Perl? I want to learn one scripting language really well rather than dabble in five of them.”
 
After expressing regret that JavaFX is yet another scripting language Horstmann said, “It drives me crazy to see yet another language.” Scripting languages all aim to make complex coding a lot simpler and easier, yet having so many seems to exasperate some developers by giving too many options. So JavaFX has to cope with a certain resistance
in the form of “scripting language burnout”. But if JavaFX Script can enable more developers and designers to utilize the immense resources of the Java language and community, and move the desktop to more devices, the potential seems vast.
 
JavaFX Script:

• Runs on the JVM;

• Is object-oriented with declarative syntax, statically typed, type inference;

• Compiles to bytecode;

• And more, lots more
 
It’s in open source alpha release with the interpreter and demos available now.
Tools are on the way with a prototype compiler now available. Neat side note: it makes it easy for designers and developers to work together.


Java 6 Update
 
Java 6 Update N will entail a new installer, deployment toolkit, quick start service, Java kernel, browser plugin and something called “Nimbus” – a new cross platform Swing L&F (look and feel). There will be new SwingX components, Painters and SwingX-WS components and more coming down the pike.  The prototype slide looked really cool. You can get all this in beta form.


Tools
 
An updated release of the JavaFX Script plugin for the NetBeans IDE 6.0 and the newly released NetBeans IDE 6.0.1 are available for download. The release includes several bug fixes and functionality improvements made to the plugin. 

Developers are working on tools for designer content creation that will enable designers to create JavaFX apps that run in a browser, cell phone and everywhere else. They envision a world where developers and designers can work together.


Demo Time

The session closed with what Josh called a paper doll demo, which he likened to a build-your-own avatar. He said it took him 10 minutes to create this demo on the plane from Seattle, Washington and that most of the time took in drawing the simple figures. Pretty impressive! Josh said that to do this in Flash would have taken so much more time. He quipped:  “Now I can spend all my time getting to be a better artist rather than coding!”

Next Josh did his Santa's Super Status System demo which he hopes to make an annual occurrence. Check it out; find out if you're naughty or nice! It's really fun!!

Josh'es final demo was a live Flickr Search illustrating that you really can talk to web services.

To close the session, Jim Weaver did his WinnerWheelJFX demo, a compiled JavaFX Script example, Spinning Wheel Got to Go 'Round. Jim's passion is contagious. His mission: To teach people how to compile JavaFX Script.  In his own words: “The code is very declarative. If you've been a Swing developer, looking at FX is like, wow, so much easier. What a relief.”

JavaFX is a leap into an unknown future. One big question about technology on mobile devices: how far can it go – both in terms of acceptable functionality and monetizing it? Will Google be able to sell advertising on mobile devices? Is the interface too small for companies to sell ads that will enable them to monetize new technology on the mobile
desktop? And what other scripting languages will suddenly get hot and appear out of
nowhere?
  
See Also
• https://openjfx.dev.java.net/
• http://java.sun.com/javafx/
• http://weblogs.java.net/blog/joshy/
• joshua.marinacci@sun.com

Learn more about Sun Tech Days.

Janice J. Heiss

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Read about what goes on at Tech Days, what kinds of technical information is covered, and how the hands-on labs work for attendees.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today