Wednesday, May 9, 2007

JavaFX in Perspective

The large number of discussion about JavaFX over the last few days seems be very polarized. So far I have only read two opinions repeated over and over:
  1. JavaFX is the competitor to Flash and SilverLight that we've all been waiting for.
  2. JavaFX is a weak attempt to cash in on the recent SilverLight announcements and has no chance for success.
What most people don't seem to get, is that JavaFX isn't even in the same market as Flash and SilverLight. It's much more appropriate to compare JavaFX with XAML or Flex (just the markup language, not the action script, runtime environment, multimedia support or animation).

Both Adobe's product line and Microsofts are made up of several packages:
  • A runtime environment - The Flash VM and the .Net Runtime
  • A declarative UI language including widgets - Flex and a light version of XAML
  • A declarative animation language - Flash and XAML
  • A scripting language for procedural logic - Action Script and JavaScript
  • A development environment for each of these three languages
  • Multimedia components - video and audio playback is supported well as first class components in both frameworks
Of course JavaFX runs on the Java runtime environment, and it defines a very nice language for declarative UI building and a decent language for animation... but that's all it tries to do.

Sun has yet to show any interest in completing the rest of the picture.
  • It could be argued that some work would need to be done to the JRE before it could be light enough to compete with Flash or Silverlight as a runtime environment (at least ease of installation could use some work).
  • JavaFX has no equivalent to JavaScript. Although one could theoretically use Java, Groovy, Javascript or some other language for procedural code, the binding isn't nearly as nice as the integration the other two frameworks have with their scripting languages.
  • Netbeans provides some syntax highlighting and code completion for the language, but it's barely better than notepad when compared to the authoring tools being offered by Adobe. To take on the competition, Netbeans will need timeline driven animation and Matise-like component layout from day one. On day two, we need vector drawing tools to compete with Illustrator and Expression (tie-in with existing tools might be a nice stop gap).
  • Multimedia support has always been a weakness in Java. JavaFX is the neon sign pointing out one of Sun's often ignored weakesses.
With all that said, JavaFX compares very nicely to Flex and XAML when ignoring their sister technologies. Feature for feature it compares nicely. Without the rest of the package, of course, it's all pretty academic. Assuming Sun is really serious about taking on Adobe and Microsoft, they still have a lot of work ahead of them.



  • I definitely agree. The majority of the opinions have been bad, but I am excited.

    When thinking about multimedia, how hard would it really be to implement an swf (video-only) player in java?

    There are already multiple parsers and manipulators for swf, and java is great at streaming... come on people how hard would this really be?

    Java has tried (and failed) to implement a cross-media player. It was a valiant attempt but a task no-one has solved. Why not go the simple route and just use the swf/flv video standard?

    Then what have we got left to do - webcam access, applet startup time and vm download size.

    As all the project is open, the community should surely be able to do a better job than adobe!!!

    By Anonymous Anonymous, At May 10, 2007 8:22 PM  

  • i hope and expect that JavaFX will have the pleasant side effect the author suggests, of causing Java's deployment "shortcomings" to be highlighted and addressed eg. JRE size/startup, multimedia support et al, to the benefit of all programmers using the java platform
    eg. java, javascript, ruby, et al, as well of those using javaFx script of course ;)

    By Blogger evanx, At May 11, 2007 10:48 AM  

  • Java is fantastic for server applications but java on the client is only viable for those who are willing to put up with horrendous RAM utilization and horrible startup times.

    I gave Sun plenty of leeway the first 6-7 years because Java was new.. but now.. 12 years later, Java is a fucking joke for end users. Sun is both clueless and incompetent for not fixing this issue.

    Shame on Sun for crapping out these turds with a straight face without first addressing the major big fat slow elephant in the room.

    By Anonymous Anonymous, At May 11, 2007 12:45 PM  

  • Why JavaFX ? That’s because Sun has nothing new to offer. The speech from Sun’s VP is nonsense. Other than JavaFX, what’s new in Java desktop? JavaFX is basically wrapped around Swing components. Swing applications are much easier to develop than C++. Why make extra layer on top of Swing that is not that difficulity to develop. JavaFX is useless without media support and a good deployment method.

    Watching the IRIS photo browsing demo made laughing. First, they could not get it to work under MAC. They could only show it under window. Then they started to complain about Window and slow network. I think that Java is not there yet as far as client applications , desktop and web integration.

    Sun really needs to focus on the fundamental things in order to make Java on desktop. There is no good support on media. It’s shame to see that the last update of JMF on Sun’s website is in year 2004. The deployment of Java desktop applications was an issue, still is and will be. After 10 years of Java programming, I start to switch to C#, at least for desktop applications. I don’t see a future of Java on desktop after 12 years of Java. Clearly Sun needs to have new leadership in the area of Java desktop development.

    By Blogger Jay, At May 11, 2007 5:34 PM  

  • Being Cross-Platform would clearly be a big advantage over the Windows-only approach of Microsoft.

    If the Mac demo has failed, then like other weaknesses there in the past (e.g. parts of Eclipse) this should soon be resolved.

    Else at least against Adobe or other scripting environments like Ruby it may not really have an easy stand.

    If the 'Script Once Run Everywhere' appeal with Mobile, TV and PDA support could really be accomplished, that would provide it the greatest advantage over Microsoft or also other competitors.

    At least who has seen anything like Flash run on the CLIENT of a Mobile Phone yet ?;-)

    By Blogger CAT, At May 12, 2007 2:17 PM  

  • Will it be fair to say that JavaFX is an attempt to introduce something that is called "resources" in WinAPI, like menus, dialogs, buttons etc but in a more flexible way, not as RC definitions, but as scripts, like XAML? If yes, this means that Sun's preacher about writing UI with Java code was just a hypocrisy. But at least Java desktop has some sort of resources now.

    > At least who has seen anything like Flash
    > run on the CLIENT of a Mobile Phone yet ?;-)

    I see Flash or something that looks very much like Flash on self-serve kiosks in Burger King (well, it is not a phone). Looks pretty cool though the value of the kiosks is doubtful to me.

    By Anonymous Anonymous, At May 15, 2007 10:51 AM  

  • The JavaFx as a language looks pretty interesting. I love the embedded expressions and the data binding model. It is a good start down the road to functional programming. The entirely too amazing LINQ features are built on the functional programming foundation laid down by C# 2.0 delegates. I would love to see a Java equivalent to LINQ expression trees. I would also love to see JavaFx include XML literals ala VB 9.0 or E4X. Pretty please.

    By Blogger Kevin, At May 15, 2007 12:48 PM  

  • Many developers have been very patient waiting for Sun to correct the problems associated with desktop Java. For whatever reasons, Sun has not been able to do it in a reasonable amount of time. JavaFX addresses only a small part of the problem and is clearly misunderstood by Sun itself. Attempting to sell this as a Flash/Silverlight competitor is embarrassing - it's really only one of several components needed to compete with Flash/Silverlight.

    Dear Sun, if you can't address slow client startup time and hassle-free enduser deployment, you really should exit the desktop space.

    Ironically perhaps, the very thing that makes Java desktop development interesting is the very thing that prevents it from being successful - WORA.

    By Anonymous Anonymous, At May 15, 2007 3:37 PM  

  • I belive JFX is in it's infant-toadler stage. But it has a potential. I am glad SUN added more pizzas to their GUI stack and simplified it Presentation layer to something that is close to SVG that is basically geared to Designers

    By Anonymous Anonymous, At May 15, 2007 7:41 PM  

  • Anonymous;

    Dear Sun, if you can't address slow client startup time and hassle-free enduser deployment, you really should exit the desktop space.

    By Anonymous Augusto, At May 16, 2007 10:18 PM  

  • By Anonymous Augusto, At May 16, 2007 10:18 PM  

  • @First poster:
    FLV video uses On VP6 and Sorenson H.263 both of which are covered by patents and need to be licensed.

    There is a GPL Java Theora player available called Cortado. Theora can't compete with the newer codecs like VP6, H.264, and VC-1 though.

    By Anonymous Anonymous, At May 17, 2007 4:04 AM  

  • It basically comes down to people not trusting Sun to make the right moves on the desktop.

    A much better move would have been if a Sun executive would have brought out a Adobe executive and they both announced that there was a Java compiler for Flash in the works.

    We need to stop fooling ourselves about Java and the desktop. It just didn't happen. Time to move on.

    By Anonymous Keith Gasperi, At May 20, 2007 1:29 AM  

  • there is a rumor: sun will release new JRE which may suite with in 2 mb space. that’s really brilliant.

    hope this jre will come with a lot of performance tuning too. so at that time we will get back to Applet type solution again. (JavaFX is nothing new except a new way to write applet :))

    @to those who things java is not good at Desktop application.

    i would love to say, java is good at Desktop application too. but this things are totally depending on how usable your application is. if developer make plan for UI, it will become (not always) less usable or user friendly. which may raise bad rumor that java is not good at desktop application. but i have good faith on JavaFX. and new script engine support.

    will rewrite my application plugin/addon layer based on script engine. (perhaps write your plugin in javascript ;))

    best wishes,

    By Blogger hasan, At May 20, 2007 2:08 AM  

  • JavaFX >> JavaFX Script

    AFAIK, the master plan is, that JavaFX will provide an authoring tool, the consumer JRE enhancements and better video/audio support (situation is ok on mobile devices, but terrible on the desktop).

    "Sun is introducing JavaFX, a new family of products based on Java technology designed to enable consistent user experiences, from desktop to mobile device to set-top box to Blu-ray Disc."
    "JavaFX initially is comprised of JavaFX Script and JavaFX Mobile."

    By Blogger Michael Nischt, At May 20, 2007 2:41 AM  

  • hi,
    i want to deploy my helloworld.fx in a webserver i.e tomcat.i created the app in neatbeans 5.5.
    in the deployment steps they had given steps reg. sign the jar.
    the step is to copy the helloworld.fx,helloworld.jar,f3start.jar into my webserver folder.
    they had given f3start.jar found in lib folder.
    but i can't find that jar any where in the system.
    can anyoen pls help out regarding thsi issue
    thanks in advance

    By Blogger sati, At May 21, 2007 8:31 AM  

  • Bryan:

    I am an editor with, a leading developer web site. I read your blog post "JavaFX in Perspective" with great interest, and I'd like to discuss a writing opportunity with you regarding this topic. Please contact me at gkunene_at_jupitermedia_dot_com if you're interested. I hope to hear from you soon.

    Glen Kunene

    By Anonymous Glen, At June 6, 2007 9:48 AM  

  • Hello, is there any java based workflow designer that generates XAML/BPEL

    By Anonymous Shuaib, At June 13, 2007 5:49 AM  

  • I am working in Windows Forms since last three years. But now there is requirement of an desktop application which can run on Linux/Mac also. So we are going to develop this in Java Swing. Now the question is do we have any alternative? If not, than how can anybody say that Java is nowhere in desktop application (as I have read many comments here). I have never worked in Swing before but I have not seen much difference so far in development of swing application after working with windows forms for three years. Netbeans is just like Visual Studio for me, and Java is just like C#. So is Java really dead for desktop application? I don't think so.

    By Anonymous Deependra Solanky, At June 16, 2007 3:22 AM  

  • the lack of a suitable video api in java caused us to migrate our apps to flash...
    and since flex has come out i have a hard time justifying working in java...
    i absolutely love the java language and the framework but the desktop/media side of things has been desperately ignored...
    now adobe have really made the game interesting with air...
    is there any life left in j2se??
    it would kill me to see that framework fold...

    By Blogger ncomp, At June 27, 2007 9:38 AM  

Post a Comment

<< Home