JavaFx, silverLight and flash challenger

You are welcome to extract excerpt of this article, but do not copy it entirely on your blog/web site.
You are only allowed to use this post content in an printed article or a newsletter by clearly exposing the source URL of this article.

Synopsis

Following my last post about silverLight, I discovered JavaFx.
As JavaFx is still rather premature for the highlight, I'll cover what my views (and honestly, my hopes) are for it.

My background

I'm a web developer by passion, but as being a Linux fan too, I've been more attracted by Java, and it's recent openness than Microsoft before. And especially since Java have been GPL'd for some times now, and that JavaFx will follow that path too.
Now, it's true that .NET can be run on Linux platforms, but Java too, and from a longer time.

This inclination have made me look more on Java development than on .NET, and I admit that I would dig into JavaFx development with much more pleasure than silverLight.

But true, this is just a personal taste.
So, don't flame me that I'm biased and didn't took as time to wrote on silverLight than JavaFx.
I know I did.

Description of JavaFx

JavaFx is an extension of the existing Java virtual machine, to add a scripting language, that would be descriptive, OS and browser independent, easy to use from peoples that didn't ever approached programming before.

The JavaFx platform is in fact composed from 2 components:

  1. The JavaFx script, which is meant to build applications. Those applications will be able to be embedded into web pages, or to be ran on the desktop, like a normal application.
  2. The JavaFx mobile, that will be an operating system or an addition to existing mobile OS for the mobile devices. I'm not sure of that one, as I read both...

The language is said to be “interface oriented”, and I honestly admit that I don't know what this should mean. My research about this programming approach has leaded me to a vague definition that I could not fully grasp.

Even so, this is an ambitious approach, and if it succeed, could be something that may draw many peoples to JavaFx.
But, there should not be forgot that this was almost the promise that Java made almost 10 years ago.

For anyone that knows Java, there is one thing that should seems really strange in the first paragraph. I hereby stated that JavaFx is scripted language, therefor Java is a compiled language.
It's not an error though. Sun intent is to merely replace AJAX with JavaFx, and to intent to do so, the scripting path was the one that made most senses, in my mind.

Non programmers people don't want to care about classpath, compiler, and creating a build.xml file to provide Ant a descriptive set of commands to compile. And they should not.
Making JavaFx a scripting language will help to make it more accessible to newcomers.

That being said, what JavaFx promise is not something new in the Java world. The promise to be able to write code once, and to run it on any platform that would have a Java Virtual Machine (JVM) available was the first promise Sun made back in the 90's, when Java was launched.

In the real world, it was not quite so. Each JVM has it's specificity, and especially when it came to the desktop area, many adaptations had to be made between GUI to provide a unified layout.
This has been made quite better now, with toolkits like SWT that provide an modern and unified look and field on every major platforms today.

Targeted public.

Sun's target this language to be used by those 2 sentences:

The goal is to make it so people never have to see code
...
Sun clearly intends JavaFX and FX Script for the masses that are not programmers. The promise of JavaFX is that it will allow for creation of content that plays on computers, digital TV, regular TV and mobile devices, and that the content will look the same across all platforms and behave the same way.

Really, it sets the bar high. It's not quite there for now, but it's getting in the good direction.
You can already preview the JFX Builder that will allow you to easily build JavaFx content, if you are not too demanding.
Just keep in mind that it's a work in progress.

You can find netBeans and an Eclipse plugins too on the JavaFx download page, and you even have the JavaFx pad to exercise your skills in real time. It's nice, but Sun will seriously need to work in that part. If people never have to look at the code.

In my opinion, JavaFx is still too immature to be considered as usable right now. It's just begun his infancy, and is a continuing evolving work.
The fact that it have been opened from the start to the community, and that Sun have seek active feedback from interested developers as much as usual Java developers is a good sign, but now the project have to set the deadlines, and the milestones to keep on those tracks.

Flash is out there for ages, silverLight is about to be officially launched, and they will make everything they can to occupy as much space as they can.

The promises for the future.

Talking about the promises of JavaFx, it may be good to list them:

Packaging.

From what I see now, this is one of the most serious part that need to be worked on. A javaWebStart link is good now, for demonstrating, but this won't be acceptable in the near future.

Look at flash:
A simple “embed” object, inserted into a web page is sufficient. The browser can even install the plugin required to run it on the fly, if it's not present or too old.

SilverLight:
It too will benefit the “embed” solution. And as being a Microsoft product, it benefits the Windows Update mechanism, which will allow Microsoft to push the plugin on almost every machines that have not explicitly deactivated it.
And even so, they could push it, so anyway, 98% of windows users will end up with silverLight being installed de facto.

Java, on the other hands, needs the user to realize an physical action to be installed. It's not integrated natively on Windows. It's not installed natively in any major Linux distribution. It's not shipped with Windows.
This could be a serious problem to reach the masses. Not everybody have a broadband access, nor is willing to download a 14Mo file.

It's true that there are a lot of Java enabled machine out there, but how many hare using Microsoft VM rather than the native Sun JVM ? And on all those JVM installed, how many peoples only knows that it's installed, and that they should update it to use javaFx ?
More important, how many users allows Java to be executed from their browser ?

That's another point, user or administrators can easily prevent the execution of Java code from the browser, but it's not so easy to do so with Flash, and I predict that it will be even harder for silverLight applications.

Conclusions.

What does JavaFx delivers now ? I'd say, it looks like a really promising tool, but a tool that will have a lot to fight to conquers it's place.
The version that we see now is still really early, and bound to many changes, but the community working for this to happens grows days after days.

I consider personally JavaFx for a real alternative that has to mature before being used, but a technology that already shows many promises. All that's needed now is to transform those promises into something tangible. You can give a look at Chris Oliver's blog if you want examples. He has gone translating existing Flash animations and presentations in JavaFx, and from what he explain, this don't look like a though work.

I think that I'll start practicing JavaFx during the next weeks/months, and I'll re-post my impressions about programming with it.
Right now, I have installed the compiler, but I need to get more grasp about the documentation.

References.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.

Trackbacks & Pingbacks

No trackbacks/pingbacks yet.

Comments

Java FX Script is currently interpreted. That will change very soon. A compiler is being created as we speak. Once that’s done, I expect that Java FX Script applications will be quite fast.

Joshua Smith

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

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

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)