As far as Rich Internet Applications (RIA) are concerned, the major player for the last decade has been Flash, and its successor Flex. Silverlight has had its supporters as well, and HTML5 is moving the ball forward from AJAX and CSS. And then there’s Java.
After a brief stint of popularity, Java applets fell out of style, and even sites that used Java in the back-end rarely used it on the client side. JavaFX, now in its second generation, is an attempt to bring Java back onto the client side, and Jim Weaver is a big fan. Founder of JMentor, Weaver thinks that JavaFX brings a rich programming environment to the client, he’ll be talking about that at OSCON later this month. He recently clued us in on why he thinks JavaFX is such a strong contender.
Can you give us a short history and description of JavaFX?
Jim Weaver: JavaFX came out in 2007. It was created by a guy named Chris Oliver, and it was introduced as a way to be able to quickly and intuitively put together rich client Java user interfaces. Developers in general, and the industry in general, rejected JavaFX primarily because it was a new scripting language. They didn’t want to learn a language, so it just didn’t get the traction that it needed.
After Oracle acquired Sun, they took a different direction with JavaFX. They abandoned JavaFX Script, the scripting language for it, and made JavaFX a set of libraries, APIs and run time. You code it in pure Java or any Java domain-specific language. That’s the focus now. The new version just got out of early access and into a very early beta in June, and it’s starting to get some traction with developers trying it and using it for smaller applications.
The argument could be made that with Flash/Flex so ubiquitous on browsers now, and HTML5 gathering steam, another RIA platform is redundant.
Jim Weaver: I have nothing bad to say about Flex. I think Flex has been a great rich-client environment, and they’ve done a great job with deployment of the run times, except for iPhone and iPad.
The reason why I don’t use Flex is because it’s not Java. It doesn’t have the millions of Java classes that are available out there and the richness of the native Java APIs. You find yourself having to use some bridging technologies. So that’s why I’m pushing for Java. But there’s nothing wrong with Flex. Flex is great.
The mix that I’m shooting for would combine HTML5 and rich-client Java in a number of ways: it would be rich-client Java, web-started, that contains JavaFX APIs for its richness on the client, with a scene graph that contains UI controls, effects, animations and transformations. JavaFX has an embedded web browser component that you can use as part of the scene graph, and it’s adopting the HTML5 standard.
The other way of doing it would be the exact opposite, where you have a browser and it’s got an app that has JavaFX. I don’t like that as well because then you depend on the browser for your JVM and your Java execution environment.
- Seven reasons you should use Java again
- Seven Java projects that changed the world
- A rough guide to JVM languages
- Clojure: Lisp meets Java, with a side of Erlang