JavaOne 2007: Sun announces JavaFX

2

Sun
announced JavaFX on the JavaOne. It was previously known as F3 (Form Follows
Function: http://blogs.sun.com/chrisoliver/)
.  It is for creating visualy rich
internet applications. Based on standard Java SE. My first reaction was: o oh,
there goes Flex. There are already two big vendors in the market for RIA’s without
AJAX: Adobe with Flex and Microsoft with Silverlight. There is a great reserve
towards Flex from Java developers. Mainly because two reasons: It’s not Java
and it’s not open source. The second argument is taken away by adobe by open
sourcing Flex. The first one is still valid. What if yiou have Microsoft at one
end of the spectrum targeting the current .net developers and Sun targeting the
java developer on the other end? Adobe would be nowhere. Unless.. they have better product. Read
on and you will learn more about JavaFX and know what my opinion is. ....

The
introduction of the JavaFX famlly begins with two products: JavaFX script and
JavaFX mobile. I will talk about the mobile part another time. This time about JavaFX
script and how to create RIA’s with that.

Java FX
script is an new scripting language to create Java webstart applications that
run on Java SE using Swing and Java 2D.

Let that sink in.

  • JavaFX
    script is not Java. It is a new scripting
    language. You will not be reusing your old java or even javascript skills.
  • Applications are distributed with Java webstart. They do not run within a
    browser, but are downloaded to the client and run locally.
  • You’ll create interfaces using swing and java 2D.
  • You’ll need to have the JRE installed on the client to run your application

That doesn’t
look revolutionary to me. What is new is the scripting language.  That scripting language makes it easier to
create swing applications. But still there are some other reasons why we are
not creating RIA’s with swing and distributing them with webstart already. It  has still the old drawbacks you had when
creating java gui applications or applets: You need that big JRE installed.

When you
look at the code for a  user interface it
looks kind of cluttered. You can do MVC, but it is all mixed. Sun didn’t choose
to use something like MXML or XAML to describe the userinterface, but you have
to script that as well.  It can make use
of binding to bind your model to your view, just like the competition.

So what is
Sun thinking? Well, maybe they were taken by surprise and this is their answer.
During the presentation James Gosling came in stage and he said the following: “An
area untouched by scripting languages is building interactive graphical
experiences that are really dynamic and flexible. Media combined in all kinds
of strange and wonderful ways”.  

For a
second I thought he was going to say flex, but he meant it without saying it. I
don’t know what happened to his internet connection, but there was some development
in that area. Maybe he should look at this blog (http://www.artima.com/weblogs/viewpost.jsp?thread=193593)
from Bruce Eckel (he wrote Thinking in Java) and see why he doesn’t like Java
WebStart and does like Flex. Also you can read from that blog that he probably doesn’t
like silverlight: It is not cross-platform enough.

You can
create real cool looking applications with swing and Java 2D. You can find some
nice demo’s on the blog from Chris Oliver. But that doesn’t take away the other
drawbacks:

  • JRE
    is a big download

  • A new
    language
  • No
    real tool support (yet)
  • smallest install base (86% of the desktops)

  • Does
    not run in browser

Flex and silverlight are doing better:

  • small download: arround 1 MB for the sliverlight and flash player
  • using existing javascript or c# skills
  • great tools: Eclipse or Visual Studio
  • Big installbase: Flash
    has 98%. Windows is sitting on on 97% of the desktops. It’s just a matter of time that they will all have the silverlight runtime.
  • Does run on browser ánd on dekstop (Adobe Apollo and Microsoft .Net)

Flex and JavFX have two advantages over Silverlight: Open Source and cross platform

Sun is
saying this is just the first release that is part of a whole family. I hope
that they can take away some of the drawbacks. If they can than they could have
something great. At the moment, as a java developer I would use Flex for a RIA.
As a .net developer I still have to choose between silverlight and Flex. It
think that will depending on the situation. Overall, I will stay being a Flex fan..

If you want
to get started with one of the technologies mentioned in this blog follow the
following links:

JavaFX:

http://www.sun.com/software/javafx/

https://openjfx.dev.java.net/

Adobe Flex:
http://www.adobe.com/devnet/flex/articles/java_testdrive.html

http://www.adobe.com/devnet/flex/ 

Microsoft Silverlight:
http://www.microsoft.com/silverlight/

Share.

About Author

I'm an Information Analyst with a broad interest. I specialize in BPM, I love the RUP approach combined with agile techniques for requirements engineering. I'm also interested in mobile and the social web. Actually, I love everything that's new and cool.

2 Comments

  1. Hi Arjaan, nice writeup. I think Sun has quite some nice goals, not sure if their are executing against them in the way they should (to win the RIA market, you should not only think developers but also designer workflow integration – something that Adobe and Microsoft are trying to do, but Sun doesn’t). And I’m really sure Flex isn’t that big of a learning curve for Java developers, the ones I’ve been working with at least all were up and running quite quickly.

    Whilst on this topic, I assume AMIS will be at the NL JUG JSpring event? Would love to catch up with a few of you and your colleagues over there and discuss this in lengthy detail ;-)

  2. Denis Koelewijn on

    During his technical session on JavaFx Chris explained that JavaFx elements on a website would be rendered using Applets. So his current demos use Java webstart, but that is not obligatory. That still requires the JRE to be installed on the client, but takes away the argument on Java Webstart. If you combine that with the plans of Sun to optimize the JRE loading time in version 7, then it all becomes more interesting.

    The NLJUG had a private meet and greet with James Gosling. During this session JavaFx with discussed as well of course. James’ comments on JavaFx is that it’s all still in alpha fase and Sun launches it now to get feedback from the community.