Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

JavaFX: Could it be a contender?

JavaFX fights Flash - but who are they fighting for?

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

A long time ago, in an ancient world when the Internet was young, the Java language was so hot that Fortune put Scott McNealy on the cover with a superhero costume and the name "Java Man." The cross-architecture power of Java was going to remake the computer world and become the default OS for all of computerdom.

Although Java found a great deal of success in education, scientific computing, and server farms, it never got far on the desktop. The Java applets that could be embedded in any Web site couldn't compete with the smooth animation and anti-aliasing of Flash. Microsoft fought back with dynamic HTML, later reborn as AJAX, and the applet threat to Redmond's Web dominance faded away.

It's now more than 11 years later and Sun is back to take another stab at owning user-level interaction. The task is harder because Adobe has AIR alongside Flex and Flash, all slightly different tools offering some functionality beyond HTML and JavaScript. Flash alone is on its 10th version and comes with more features than ever before. That's just the beginning: Microsoft offers Silverlight, Apple still pushes QuickTime, and there's always the animation fun in AJAX. All of them are competing to be the dominant tool for delivering heavily animated widgets for picky users who presumably want their slick graphics to dance, wiggle, and swoosh across the screen in the process of -- oh, I don't know, sending an e-mail.

Lipstick on Java

Sun is now a bit better prepared for the battle. It has a rich stable of libraries for animation, including the well-regarded Java 2D, developed with Adobe to mimic much of the computational structure of PostScript. This is essential because some suggest that Flash beat out Java applets for Web animation because it offered smooth anti-aliasing. If Java 2D is not enough, there are a huge panoply of open source libraries developed to handle almost any need a programmer might have.

The problem for Sun was how to put this wine in a new bottle. Although the parts were ready for Web artists long ago, artists weren't ready for them. Some savvy artists can write scripting code for Flash, but pure Java requires a great deal more devotion. So Sun created a new language that is little more than syntactic sugar on top of Java. It built something that it hopes Web developers will like and used a new compiler, javafxc, to turn it into Java byte codes for the JVM. Voila! Java with lipstick.

I've spent several days playing with the new language, and I've come to the conclusion that JavaFX's success and failure will be largely a matter of taste. The new syntax hides some of Java's nerdiest and most insistent requirements, giving the user a bit more freedom to ignore some punctuation. Many of the design details about color and placement can be mixed right into the code, producing something like CSS, HTML, and JavaScript combined in one file. There are also a number of built-in functions for handling the most common tasks, such as tweening GIFs or loading a remote file.


  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.