After attending the Devoxx 2009 conference in Antwerp this year and seeing a number of presentations on JavaFX I got motivated for using it. The main reasons for looking at it would be:
- it runs on the JVM so integrates nicely with other features/libraries in Java. For mobile it is based on MIDP which is available on many devices.
- it is a really compact expressive declarative syntax for user interfaces which is attractive
- both desktop and mobile clients can share most of the code. Simple applications can be deployed with minimal modification on both desktops and mobiles.
Therefore, I did some digging into the possibilities on the internet.
Here are some of the things I found. Contrary to the marketing buzz about JavaFX. It does run on MIDP but it requires a special runtime. The runtime itself can be provided by the phone vendor (preferred) or it can be a part of the mobile application as regular compiled java code. And now it gets interesting. Apparently SUN is still investigating licensing issues for the runtime (for almost a year now). In the meantime, the runtime is nowhere to be found and as a result it is not possible to run JavaFX applications on mobile devices that support MIDP (like Symbian). SUN only ships a runtime for WIndows Mobile.
Another issue is development support. Now, more than half a year after releasing JavaFX, the eclipse plugin for instance still doesn't understand how to format the source code, which is in sharp contrast with the message from SUN claiming 100000000 downloads of the JavaFX runtime. Probably just a simple confusion with JRE downloads which automatically contain the JavaFX runtime since jdk 1.6 update 10. Surely, if there would be that much interest from the public, formatting the source code would have been implemented already?
When looking at support from vendors the situation gets worse. Sony Ericsson and LG appear to back Java FX, but when looking at a recent roadmap from Nokia which goes as far as 2011, Java FX isn't even mentioned. In effect, it looks like Nokia is putting all its weight behind Flash/AIR and Qt (why would anyone want to program C++ again?). On the positive side, it does look like Android will support JavaFX. But what is the use of programming in JavaFX when it can only target a small subset of the entire population of devices out there?
Don't get me wrong. I really like the technology and was impressed with how much you can do with so little code in Java FX. The problem just is that it looks like no one is really using it and, if nothing drastically changes, no one ever will. The situation around it is so weird that I am still hoping this is just a bad dream and not really true.
From the looks of it the only really portable way currently is to use Flash. That even works on iphone since Adobe made a feature to compile Flash to native code, so that Apple will accept Flash applications into its app store. So for all of you wanting to make applications for desktop and mobile, Flash is your safest bet right now. Seriously Nokia, Qt/C++?!??