Wednesday, 1 July 2009

Ajax vs JavaFX

« On the road to ICEfaces 2.0 | Main | Ajax Push for OpenSocial »

Is JavaFX the "next thing" to replace Ajax? Should we even be comparing these technologies at all? Just for fun, here's an entry from my blog in a parallel universe (I have HTTP-only access to this parallel universe through alien technology that was discovered inside an asteroid that crashed in northern Alberta. Note that ICEfaces also makes use of this advanced alien technology.)

One of the most important features of NetBeans 7.0 is the new timeline-based editor for enterprise applications. Just drag and drop your form fields into the keyframes and the tweening animator will interpolate automatically. For instance, if your case number is derived from the submitted date, the date field will morph into the case number field. For users, the interface to the generated application is simple and familiar, like a movie player. They just position their cursor on the first field and press play. It's fun for users to try to get their text input into the various fields as focus automatically sweeps across the animated data entry form.

GlassFish now also boots via JavaFX rather than OSGi. Just press the play button, and GlassFish modules from the individual keyframes start up in sequence. EJB and Asynchronous Servlets have new sound effects that can be dynamically loaded from the update center.

Further extending the capabilities of ICEfaces Ajax Push to support timeline-based enterprise applications (and their associated client-side Java runtime requirements), ICEfaces now introduces Hardware Push in association with Federal Express. Ajax Push allows page updates to be asynchronously delivered from the server to the client; Hardware Push takes this concept further, allowing a full client machine with current software to be pushed to the user (please allow two business days for delivery), allowing them to use timeline-based enterprise applications. Once the initial hardware is delivered, ICEfaces automatically determines the incremental updates, and pushes only the additional hardware or software necessary.

At this point, you're wondering if I've gone insane. Remember, the above text is taken from a web page in a parallel universe, it has nothing to do with me. So, let's return to our comparison: what is JavaFX?

JavaFX is an expressive rich client platform for creating and delivering rich Internet experiences across all the screens of your life. The JavaFX platform gives you unparalleled freedom and flexibility to create expressive content across multiple screens, including mobile devices, desktops, televisions, and other consumer devices.

In other words, JavaFX is a great way to create Applets for mobile phones (at least, those that run Java) and set-top boxes. Ajax is a great way to deliver user interfaces in web browsers for enterprise applications (and any other browser-based application). This distinction is very clear, and yet many people are confused (myself included, until late last week). The confusion arises not from the JavaFX message itself, but from where it is delivered. When Larry Ellison tells us during the JavaOne General Session:

"We'd like to see accelerated development based on this exciting new platform Java with FX, which now allows us - thank-you very much James [Gosling], no more AJAX tools, which a lot of suffering programmers will, you know, pray for you for the rest of their lives because they don't have to program in AJAX any more."

Everyone is sitting in the General Session as an enterprise Java developer, with the perspective that everyone else in the audience is an enterprise Java developer. Therefore, the message on JavaFX ("use it to develop your application") is perceived to be about enterprise Java applications. The message itself isn't confusing ("JavaFX is great for set-top box UIs"), but the environment of the message causes it to be misdirected. In other words, we shouldn't even be comparing JavaFX and Ajax. (Also remember that coding Ajax by hand does bring suffering, but using ICEfaces to build Ajax applications is really very pleasant.)

I suspect that The Ajaxians on Ajax vs JavaFX was one of the more entertaining talks of the show, but I was unfortunately unable to attend (conflict with JSF/JSR-314 and Servlet/JSR-315 expert group meetings). Maybe this was their conclusion as well?

Posted by ted.goddard at 6:26 PM in Entries by Ted Goddard

 

[Trackback URL for this entry]

Pingback: rainwebs at Sun, 5 Jul 1:14 PM

Ajax vs JavaFX
Hardware Push – Ted seems to have an entry card to Area51: http://is.gd/1o181

« July »
SMTWTFS
   1234
567891011
12131415161718
19202122232425
262728293031