Why JavaFX Sucks… for now

[ad#google]

Warning: Ranting Ahead
This article was written around the launch of JavaFX.com, it may prove untrue in future version of JavaFX, first version mistakes happen.

No Graphic Design Environment Intergration
Being able to code designs in XAML for Silverlight is great. But RIAs (Rich Internet Applications) are all about graphics. Fortunatly, both Flex and Silverlight are backed by companies that produce fully integrated graphic design solutions.

Sun, on the other hand, doesn’t make graphic design tools. This means JavaFX will never attain the integration level of Flex or Silverlight, simply because the graphic tools required to produce JavaFX content belong to its competitors.

Poor Media Support

Silverlight is backed by Microsoft’s array of video encoding and distribution tools. Everything is very well integrated and Silverlight 3.0 will bring support for H.264. Microsoft has long been serving streaming markets with tools that work. Flex has everything Adobe does, including Flash. Just the fact that Flex runs on Flash, which gives it access to Flash’s proven video solutions, makes it better.

JavaFX on the other hand is stuck with a subset of Adobe Flash’s FLV format, called FXM, to display video. JavaFX does support a bit more than that, but the cross platform framework is limited to VP6 and Mp3. Even though JavaFX may be capable of communicating with Mac’s Core Video or Windows’ Direct Show because it runs on Java, we’re still talking about web apps here, a place where dependancy on the OS is not welcome.

Heavy Plugin

The plugin part is even more boggling. Unlike Flash and Silverlight, JavaFX relies on the whole Java plugin to run. Installing Java is far from being a light experience. Even more problematic is Java on the Mac platform. Java on Mac is distributed through Apple’s own Software Updates on Mac OS X. And if that latest update did not include something very new from Sun, you’ll be surprised that you won’t have access to some JavaFX content, even though you have the latest version (as is the case right now as I type this).

Edit: Developers can download the latest Java SE for developer stuff at apple.com/java/download/

Edit 2: I did some tests on JavaFX formats for interpreting vector graphics. the FXZ came in very close to the SWF rendered from Flash while an SVG came in at around 5 times the size. However, when it came to performance, the same heavy vector graphic on the SWF would perform twice as fast as the SVG in most browsers while the FXZ would nearly crash Netbeans, but is at least very performant on the desktop viewer in the JavaFX Production Suite. It would be a good thing to note though that the FXZ viewer seemed to cache a bitmap version in RAM everytime I would resize the vector art, something that was done dynamically on the SWF with acceptable performance albeit the complex vector. As Netbeans was resizing dynamically with a true vector display and nearly crashed, we could safely say that FXZ is far from fast. SVG is much faster to interpret and SWF simply puts both on the floor. I have yet to try XAML.

It’s Slow

What do you want me to tell you? This RIA platform is simply broken. The poor demos aren’t even real full page RIAs, they seem more like turtle-speed Flash-like embedded apps than an actual worthful demo.

On my older Pentium 4 hardware, the JavaFX samples from JavaFX.com loaded, slowly, but they did load and run, although far from as smooth as Flex or Silverlight demos. Although JavaFX apps took longer to start than Silverlight or Flex apps on my 2.66ghz Pentium 4 PC, this behavior is identical on any processor (Java libraries are to blame). Performance-wize, the apps tested in my previous entry weren’t on the same level and when it comes down to it, they are all more or less the same just acceptable speed on older hardware.

On my Mac, every single demo app nearly made the browser crash (by which I mean Firefox would stop responding for a while, under a minute). In fact, only Firefox survived. Both the latest versions of Safari and Opera would crash badly. And all of that on a Intel Core 2 Extreme 2.8Ghz.

Edit : I’ve tested JavaFX on a few other PCs and it turns out it runs perfectly well (better than earlier releases of Silverlight in fact). Sure, JavaFX still takes a lot of time loading the applications because of the way Java apps run, so it cannot replace embeded Flash, but if Sun succeeds at making it performant on all platforms (say, fixing a few quirks), it does have a place amongst RIA frameworks.

Conclusion

If you’re looking at making RIAs, I’d place my bets on Microsoft’s offers because of Silverlight’s intergration with ASP.net and the Visual Studio IDE, IMO one of the best IDEs that exists and Adobe’s offers because of its platform’s capacity (superior video, Air, Flash animations, Flash’s popularity, vector graphics speed, etc.), but certainly not on JavaFX, at least, not for now.

JavaFX still needs a bit of polishing and a lot of luck to gather market interest. I’d have to say that unless something inovative is brought by JavaFX, it’s not really going to catch on. Let’s face it, most developers that would do something like an RIA are on Adobe stuff already and if it wasn’t for Microsoft’s sites using Silverlight, it wouldn’t have gathered much attention.

However, JavaFX runs on Java, and there’s a lot of Java developers. This is sure to help.


Share this!
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • LinkedIn
  • del.icio.us
This entry was posted in Uncategorized. Bookmark the permalink.

11 Responses to Why JavaFX Sucks… for now

  1. Youmustbekidding says:

    “nearly made it crash”!?! Crack head comment, honestly. It either crashes or it doesn’t. Period.

    Who do you work for? Adobe, Microsoft, or one of their partners? The first silverlight release was far more broken than javafx. What is this, selective memory?

  2. admin says:

    What I meant by “nearly made it crash” is that my browser stopped responding for a while, maybe 40 to 60 seconds, on a dual core system, which is too much.

    If you read correctly, I also make note that this happens on Mac only. The Windows release of JavaFX is, yes, less broken than the first releases of Silverlight, and yes, Silverlight had a lot to do, and still has, to catch up with Flex.

    I don’t work for Adobe, or Microsoft, and yes this article is pretty much ranting and not an actual calm comparison, that, I have to admit. But no, on the contrary to being an Adobe or Microsoft fan-boy, it was more deception to see JavaFX being at that point right now than anything else.

    I was hopping that particular JavaFX release would have VP8 as video, as was announced, etc. We’ll see how it goes.

  3. Pingback: Java, JavaFX news round-up - Technology

  4. sanosay says:

    Hm..i use to program on Java . then when the release come out , i was surprise by the promises from sun…,
    then i download the dev tools and start learning by examples…all seems to be Ok , but after 2-3 days i have been surprise by the times my browser (Mozilla firefox) crashes(soz for my egl.i am from Greece)
    Sun have to redesign the holl javaFx script…it sucks…

  5. Pacoup says:

    Agreed, I’m just surprised they didn’t actually fixed this by this time. It’s already been quite a while since JavaFX 1.0 has been released. I mean, sure, it’s kind of new, but by now competitors like Microsoft have made much more strides with Silverlight, which already better from the start.

  6. Ashu says:

    hmm ..and a new scripting language ?? i’d rather learn flash then risk learning Javafx [any way peaple at sun did a nice job of promoting it ,they almost tricked me into learning it]

  7. suvi says:

    More than a year has passed, since you wrote this post.

    JavaFX 1.2 (today 1.2.1) is out. Where do you see improvements?

    Where are still the big blockers?

  8. Pacoup says:

    You know, a lot has happened in a year. They’ve fixed a lot of the issues for JavaFX, but they’ve barely managed to get anything going with it. It’s still plagued by quirks such as slow launch and the lack of native rich media APIs that are present in Silverlight and Flash.

    However, don’t take this as “Java is less powerful than Flash/Silverlight”. Of course not. Java is an order of magnitude more powerful and capable than Flash and has a higher potential than Silverlight. Since Silverlight 4 however, you have the ability to take the complete CLR, which is analogous to Java’s JVM, online in the browser, which makes Silverlight somewhat on par with Java Applets in terms of capabilities.

    But that’s exactly the problem, it looks like Sun had it all wrong. I don’t know what’s up with these people and Java really. It’s as if they thought Java was weak. Truthfully if you really want to make JavaFX RIAs, you’re better off making straight Java Applets. They’ll load faster and they’ll enable you to use Java (or other JVM languages for that matter) instead of JavaFX Script. There’s no real benefit of the tools you’re going to get if you use JavaFX, so it’s just not worth it.

    Oracle, which recently bought Sun, does intend to change that, apparently, but it’s a game lost before it’s started in my opinion. Flash’s arguably main use on the web, video, thanks to YouTube, is being supplanted by HTML5 video and Silverlight, despite the tools and support is in the same boat. Things are going plugin-agnostic so unless you need to develop powerful enterprise apps in Java and leverage the skills for both client and server solutions, stay away from it.

    Nonetheless, learning Java instead of PHP is a really good idea. The new Java EE 6 platform is much simpler and is going to become even more powerful than it already is with Oracle on it. I still think Java has a place in applications, notably in the mobile space (a.k.a. Android) or in the high performance complex RIA space which actually doesn’t exist yet; think Photoshop and 3D Animation apps in the browser. But then again, the future looks like it’s holding something else under the name Google Chrome and Google Go. I’d look at that for the future of web applications.

    So yes, again, I think JavaFX is useless and crappy.

  9. harish says:

    First of all, for the original post, as it says sun doesn’t provide any graphical tool for java fx.. Who said so? Currently Sun in coming up with “Java Composer” which is the graphical tool for building java fx scripts. Its currently in beta phase.

    Regarding the discussions of browser crashing etc.. If you remember Adobe flex took years to stabilize and java fx is still in it’s path to stability.

    Microsoft silverlight was stable from beginning because, Microsoft doesn’t release any product unless it’s stable. They do all that internally before releasing it to outer world. So you never really know how long it took silverlight to stabilize internally within Microsoft.

    On contrary, Sun doesn’t wait for the products to stabilize completely. As it encourages open community process, it releases it’s products when they reach minimum stability level and moving forward they take the criticism and feedback of the earlier released versions, for the development of next versions. This makes the products very stable over time because whole world would be testing it, a lot of bugs will be logged and once these gets resolved overtime, you will find a very stable product.

    So the crux is, just wait more and let java fx stabilize. Its still in evolutionary phase.

  10. Pacoup says:

    Sure, but you should really look at the date of the date of the post. It’s dating to December 8, 2008.
    What’s in the beta phase right now was non-existent (and Sun said so) at the time.

    However, things have changed and I’m right with you with the whole open source evolution thing, something I didn’t understand at the time. And with Oracle buying Sun, the future of JavaFX seems brigther at least if it’s not to be eclipsed by HTML5.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>