JavaFX is not even released, yet, you can find numerous articles on the internet which give the impression that people all around are already digging its grave before it’s even born.
Personally, I very much wonder why… Sun Microsystems is doing a serious attempt to revive Java on the Desktop as well as giving the whole RIA-hype a go. Most articles I’ve read say: “who wants to install the Java Runtime?” or “there is Adobe Flex and Silverlight, Sun’s too late” and there is a truth to it. Windows, the most commonly used operating system does not ship with the Java Runtime anymore and an old version of Flash is installed out of the box with Windows. These are very valid assertions, however, for Flex/AIR you will need a newer version of Flash installed and Silverlight is, though smaller in size, no smoother to install than the Java Runtime.
I’ve even read an article where the author was questioning Sun’s motivation to introduce JavaFX Script rather than using XML. In my opinion, not using XML is very refreshing. Just look at Spring (being the prime example) and 99% of all the other Java Frameworks out there. Most of us end up writing nearly equally many lines in XML as in Java and I feel that XML is being abused for configuration rather than what it was invented for: data exchange. Furthermore, using a Domain Specific Language for GUI-development goes hand in hand with the current effort in the Java Community to introduce DSLs to speed up the development process (look at Apache ServiceMix’s DSL or the numerous DSL-additions to Groovy).
Anyway, back to JavaFX and its viability. As I previously mentioned I think that Sun is trying to revive Java on the desktop and if you take all the variables into account, they just might succeed.
I won’t wrap up quite yet, I want to share the issues at hand so you can possibly re-evaluate your opinion of JavaFX.
The Runtime-Issue
The biggest show-stopper at the moment might be the absence of the Java Runtime on many home-computers. How do you get a home-user to install a 15MB plugin in Internet Explorer or install the Java Runtime to run a Java application?
What many fail to see is that Sun is actually addressing this issue with the latest Java 1.6 update (1.6.10) by introducing modularity to the JRE. You can still install the full JRE, being appx 15MB in size, but if you just need Java to show your RIA-application in the browser, you get by with a subset which is about 5MB in size. In contrast, Silverlight is close to 5MB (including the .NET Runtime) and Adobe Flash is 1.5MB in size. Certainly, this means that Flash has the smallest footprint, but in the time of broadband, I don’t really think that 5MB is a big issue.
Sun will provide a Plugin Deployment Kit and thus the end-user will have no issues with getting your application to work. It will just be the same as with any other web application requiring a plugin to work.
Also, Sun provides a background upgrade mechanism. Essentially this means, if your application needs more features than the once currently being installed, the JRE will download the added modules on the fly.
The Development Environment Issue
This is a little bit Sun-typical. Invent a nice technology, kick it out the door and then walk away for somebody else to pick it up and make it useful. We’ve seen this before with JSF. It’s a good technology but why in god’s name weren’t there any development environments available from the start? It aids developers and is almost certainly a guarantee for fast market adoption (provided, the technology is useful). Sun could have worked with IDE vendors from the start to give JSF the attention it deserves and this will be a crucial factor if Sun wants JavaFX to succeed.
Certainly, Java developers like to write code and since we are incidentally also a bit lazy, we have perfected the art of HST (Hooking Shit Together)… most of us simply don’t like writing the same glue-code over and over again. Not that this is an issue with JavaFX Script (being a DSL designed for GUI-development), but still… designing a GUI graphically is more much better than the endless “coding-previewing-coding-previewing-…”.
Luckily, Sun has been thinking about this and there is a JavaFX-plugin for Netbeans on the way.
The UI Issue
Yes, Swing applications aren’t known to look like or perform like a Windows application or a GNOME-application or even a MacOS-application. Despite the fact that Swing performance has been greatly improved in the latest versions of Java and the fact, that your Swing-app can look very close to a native application, people just don’t forget how it was a couple of years ago.
Nowadays, we are more and more used to the fact that application vendors add their own little effects and thus, most applications just don’t look like the next and this will in turn help us getting better acceptance for an application not looking absolutely identical to other applications. Furthermore, Sun introduced a new Look And Feel called Nimbus, which looks modern and a little bit like the MacOS UI.
Last but certainly not least, the performance will improve by using Windows’ DirectX API to render your application. Your application will now be able to use the Graphic Card’s accelerative capabilities (just like Windows Vista does) and without having done any performance tests, I am looking forward to Java Apps having “almost native” performance.
Portability Issue
Not all is good, though. Even though the following might be a theoretical problem, I am in doubt of Sun’s “one framework for all devices”-marketing.
If you’ve ever been to JavaOne you probably know that Sun is never getting tired of telling us that Java has an enourmous market penetration with several billion people having Java-ready devices at home (imho, Java-Ready doesn’t mean that there is a useful Java Runtime installed on those devices).
Unfortunately, Suns neglect of the Micro Edition has lead to the fact that the most advanced phones today don’t even come with a Java Runtime pre-installed and those phones that do have a Java Runtime aren’t upgradable, which leads me to question if JavaFX will actually ever run on those telephones.
On the other hand, Set-Top Boxes or GPS devices are often upgradable and if you are in the business of developing software for these devices, you still may have use of JavaFX… As a mobile platform, however, I have my doubts. Maybe in a couple of years when Sun puts some work in the Java ME platform and convinces the big players to integrate it into their phones we have a chance at deploying JavaFX-based apps on them.
As more and more devices are portable, this will be another critical issue and providing that enough of us use JavaFX, I believe that this isn’t an insurmountable problem.
Ultimately, I think that despite the existence of Flex, Silverlight and numerous other RIA-frameworks, JavaFX definitely isn't a write-off. It's not solely for RIA, but an attempt to make a universal framework for "Rich Applications" based on Java. And even if it would be exclusively for internet applications, is competition such a bad thing? I don't see anybody questioning why there are different app servers or even operating systems. So let's wait for JavaFX and do a fair comparison when it's ready.
July 27, 2008
Subscribe to:
Post Comments (Atom)
3 comments:
About the Silverlights 1.5 vs JavaFx 5 mb download, you mention that you would still need to have the .NET framework installed. This is not correct. Silverlight runs without it.
Hi pepe, that's correct! I meant to correct it before I posted it but it slipped my mind. Silverlight 2.0, to my knowledge, contains a minimal .NET Runtime but also adds a couple of megabytes to the download.
Also, I want to clearify that I am not bashing Silverlight nor Flex.
Just another thing. What JavaFX lacks today is a set of demos showing off the technology. And I mean impressive demos that don't show bubbles moving on the screen.
There is a Studiomoto demo (google it) that is supposed to show that you can do Flash style websites (which I do not doubt at all) with JavaFX, but the problem with that demo is that you need to download 5 MB of code after clicking through some scary warning dialogs. How could this ever compete with today's Flash or HTML/CSS/JavaScript/Ajax websites?
I want to believe in JavaFX, but it has been over one year since it was announced and there is still no proof out there that this will a good alternative to Silverlight or Flash.
Post a Comment