Tuesday 26 January 2010

Flash vs. JavaFX

I wrote the same eCards using JavaFX 1.0 in NetBeans and Flash 10 (with ActionScript 3) in CS4. The contents and algorithms of the eCards are the same but the outcome are quite different.

User Experience

  1. The Flash version has 200 snow flakes and the JavaFX one has 30. The result is that Flash eCard is very smooth and the JavaFX one is jerky.
  2. If your browser does not have the required Flash plug-in, you can still view the rest of the page; but JavaFX forces your browser to go to Sun to download the plugin and you cannot see the other contents of the page.
  3. The first time you view the pages, the .swf file and .jar files will be downloaded to your computer respectively. The time taken to download them are not that much different with Flash version slightly shorter. However, if you view them afterwards, the cached Flash eCard will be played instantaneously without having to download again even after you restart the browser or computer. But the JavaFX version will be downloaded again every time.

Designer Experience

  1. The CS4 environment is a lot easier to use for designers. You can do things graphically or programmatically. In NetBeans you have no choice but to write code for everything – even to manage timelines!
  2. CS4 generates deployment code/files for HTML and AIR. It is really easy to deploy .swf files and the process is simple, robust and mature. I can’t say the same thing about Java Web Start, which is nowhere near production quality.
  3. If you are like me, who wants to learn things from free web resources, then JavaFX is easier since there is only one way to do things – by writing code (this could be a bad thing for some). Most of the tutorials and sample codes work. But the different ActionScript releases are not backward-compatible. Many of the code samples were written in AS 1.0 or 2.0 (since they have been out there for many years) – they do not work in 3.0.

Related Post:

4 comments:

Anonymous said...

I've noticed that you have written the E-Card Greeting using JavaFX 1.0. JavaFX 1.2.1 has not been used despite the fact that the post was made in 2010. Is there a reason for doing so?

Romen Law said...

In comparing the performance of the two, I have recompiled the old eCard that I wrote at the end of 2008 using the latest JDK and NetBeans 6.8. There was no visible difference. I did not make a new blog post for my new compiling exercise.

cheers
romen

Anonymous said...

I remember you doing a SLOC comparison for an app a while back. Do you know of any Code Count tools that support JavaFX?
--öge

Romen said...

Hi öge,

The SLOC comparison I did was between GWT and ZK. The code count tool can be found here.
I don't know of any code counting tool for JavaFX syntax.

cheers
romen