Tuesday, 16 December 2008

The Sorry State of JavaFX 1.0

The release of JavaFX 1.0 officially marks Sun's defeat in the RIA battle. Why? Because JavaFX 1.0 is inferior to its competitors in all major battlefronts of the RIA war. It looks like a rushed job to make a marketing deadline.

The JavaFX 1.0 APIs

The JavaFX 1.0 is shipped with 2D graphical capabilities and that's pretty much it. Even basic things such as 3D graphics, faster video codecs are labeled with 'coming soon...' on their demo site. Forget about building any business RIAs because there are only a handful of simple Swing widgets at your disposal. On the other hand, people have been using Flash to build business applications for years; Silverlight has got 3D capabilities since v1.0.


The JavaFX plugin for NetBeans is a joke - it's buggy, sluggish and poor in features. One mistyped word or bracket can result in red squiggly lines all over the screen; then it produces unhelpful error hints such as 'sorry I was expecting so and so but I saw such as such...' so that the user has to read through the whole sentence several times and still hard to figure out what the complaint is. What happens to KISS principle?

Sure, Sun had said that they intended the plugin to be used by designers also - hence the 'user friendly' error messages. But let's get serious, how can anyone assume graphical designers will be using computer programming language to define simple things such as Timelines? Sun doesn't have to look far to find a better way - Microsoft has Expression Web to be used by graphical designers, and VS.NET 2008 to be used by programmers when it comes to Silverlight design and development workflow. (The JavaFX plugin for Illustrator is only good for editing shapes).


To me there is not much point of deploying RIA as a thick client using Java Web Start. I am only interested in running RIA in a browser. With the new way of deploying applets in Java, JNLP is used, so that the HTML file points to a JNLP file and the JNLP file points to the JAR files and more JNLP files... It's a bit like my multi-hop flight from Sydney to Kathmandu (via Bristane then Bangkok) that took me over 20 hours and 6 of which was waiting at BKK for transit (that that is how I have the time to write this post) all because my company was too cheap to book the Qantas flight.

This is unnecessarily complicated because Sun doesn't want to have JavaFX plugin to the browser. On the other hand, Flash/Silverlight plugins are installed onto the browser so that all you need to specify is the object or embed tag in the HTML file without the hassle of running the myriad javascripts to detect/download the additional framework JAR files every time.

The User Experience

If you are using a browser that does not have the latest Java plugin (that supports JavaFX) installed (such as on my Nokia N95, or using the PC in the Thai Airways lounge at Kathmandu international airport), then you will be greeted with a message box forcing you to redirect to Sun's download website. There is no option to cancel!

Moreover, those javascripts do not report any errors if something goes wrong - it just hangs there with the Java logo spinning around and around forever...


Anonymous said...

Could you please show me silverlight with 3D power on linux? Ohh, silverlight is RIA for microsoft OS only.. Ok then. What about doing (for years) flash applications with syncronization? Hmm.. The flash player only has one thread of execution. Yeah.. Not very much convenient for enterprise app. By the way javaFX can do those and much more. IMHO your attitude is rather green.

Romen said...


If you have read my blog carefully, you will notice that all my claims are backed by facts. I won't say that I am an expert on JavaFX, but I certainly have used it constructively - just click on the JavaFX tag on this blog site to see a few examples. So green or red attitudes have nothing to do with the sorry state of JavaFX 1.0.

I would welcome you to back up your claims with facts. I would love to see all those things that you can do with JavaFX "and much more".


Anonymous said...

I agree with you Romem. I'm trying to port my Ajax app to JavaFx. The numerous problems I face mainly have to do with me understanding the technology. Documentation is poor and scattered almost and even sample code is piecewise, so you have to fill in the difficult parts yourself.
Layouts are also lacking. I started ExtJs on Saturday morning, by evening, I had an application with a serious look and feel because they had good documentation and the emphasis was on the users of the framework.
But anytime I try to go near JavaFx, I loose hope cos it's EXTREMELY difficult to understand with so little documentation which in most cases seems just to be a marketing tool for Sun and not for the end developers.
It must be noted, usability is better than features. If it can run a thousand threads and I can't even start a single one, what benefit is that to me??
If it runs on Linux and I can't even get do sth with it in Windows, what do I care??
Sun should behaving like scientist (new stuff new stuff new stuff) and help us understand the little that they have.
IDE is a must

Romen said...


I have also been trying to port some of my web applications (which I had successfully ported into many other web frameworks) into JavaFX since its v1.0 lauch. I suffered the same experiences as you. That is why I published this post.

I always stress the version number - v1.0 in my JavaFX bashing in the hope that things will dramatically improve in newer releases.