Saturday, December 06, 2008

JavaFX vs Silverlight vs Javascript vs Flash vs Java

JavaFX 1.0 final has been released. Go check out some samples at A quick performance test reveals that JavaFX is able to reach really good performance, which I was afraid it wouldn’t even though it is using the best performing VM there is underneath.

Now if they only could get rid of that java tray icon by default too…

A simple performance test was created some time ago for Flash and Silverlight, also available as an JavaFX version. Here are some performance numbers from my laptop when increasing the input number by a factor 10:

Technology Time
JavaFX 1.0 3.963s
Silverlight 2 C# 4.257s
Flash 10 27.840s
Javascript, Internet Explorer 7 ~20times slower than Chrome *
Javascript, Chrome 22.989s
Java 6 3.948s
Java 6, interpreted 22.973s

Result above are the best out of 4-5 runs.

* = IE7 complains about slow running script. Using the default input number it takes just over 20s. Chrome does that in around 1s and JavaFX and Silverlight under 0.2s.

I think someone put it well when he/she said something along the lines of: Adobe people will continue to use flash/flex/air and dot-netters will use silverlight, but now the java-crowd has a choice that integrates better than everything else into their own environments. As java is the most widely used/popular programming platform that alone helps assure some amount of success… maybe.

JavaFX really requires the latest and greatest java version, update 10 (update 11 is also available now by the way) and with that I see JavaFX’s greatest advantage: It integrates fully with the normal java environment and provides true seamless web and desktop integration for both users AND developers. Server/Enterprise (and soon mobile) integration is also nice for the developers.

Goodbye ajax. JavaFX, Silverlight and Flash just does it better and easier… Why restrict applications to html and a browser?! ;-)

Update June 2009: JavaFX 1.2 has some great performance improvements (graphics/scene graph related I guess). See this for an example of a 3x speed up in performance: