JavaFX Refcard Released: Meet The Author
Today we've released the JavaFX Refcard, one of the cards on our schedule that I've been eagerly anticipating. I met the author, Stephen Chin, to discuss JavaFX, why it doesn't get the backing that it probably deserves, and finding out a little about the JavaFX 1.2 release.
Click here to download your free JavaFX Refcard now!
James Sugrue: Hi Stephen, Could you please introduce yourself?
Stephen Chin: Perhaps the best way to introduce myself is through the computers and
technologies that molded me. My first computer was a Macintosh 512K
enhanced, which taught me that the world is graphical and infinitely
navigable with just a mouse in hand. In college I had to write a basic
Unix OS and learned the wonders of protected memory. With my loyalty
between platforms in jeopardy, Java was a savior providing
cross-platform support for Macintosh, Unix, and my friends with PCs.
I have grown with Java over the years. From my hobbies of writing games and open-source infrastructure, to my work on large-scale B2B server applications, Java has been a solid foundation that has continued to innovate and evolve to keep up with the times. JavaFX is another leap forward in innovation that will help propel the desktop and mobile Java space beyond applets and simple games the same way that Java has taken over enterprise application development.
Sugrue: How are you involved with JavaFX?
Chin: I got my start with JavaFX writing WidgetFX,
a desktop widget framework, which has taken on a life of its own.
Since then I have been very active in the JavaFX community,
co-authoring Apress' Pro JavaFX
Platform book, starting an open-source library of utilities,
add-ons, and samples for JavaFX called JFXtras,
and working very closely with the Sun JavaFX team to help improve the
language and platform.
Since Java and open-source technologies are my passion, my focus right now is on helping to build the community and technology that will make JavaFX successful.
Sugrue: Could you please describe JavaFX to those who may not have heard of it?
Chin: JavaFX is Sun's new platform for developing rich internet
applications. It includes a new language called JavaFX Script that is
specifically tailored for writing user interfaces, as well as a new set
of APIs that cover the gamut from UI controls to media playback to
charting and graphing. One of the most innovative features of the
JavaFX platform is cross-device portability. The same JavaFX code can
be run on the desktop, mobile phones, and other embedded devices (such
as set-top boxes) in the future.
Sugrue: What are the main advantages of JavaFX over Flex and SilverLight?
Chin: Flex and SilverLight are both very powerful RIA platforms in their own
rights, and while I won't attempt to do a full comparison, some of the
advantages I see in favor of JavaFX include:
- Simplified RIA development - By introducing a UI-tailored scripting language, and a clean set of APIs tailored for graphics, animation, and media, JavaFX significantly cuts down on development time to build rich internet applications.
- Integration with Java libraries - JavaFX applications run on the same JVM as Java, which means they can take full advantage of the huge set of existing open-source and third-party libraries.
- Cross-platform support - While it took a while in coming, the new Linux support in JavaFX and 64-bit support on the Java browser plug-in confirm Sun's commitment to maintain cross-platform compatibility.
- Seamless mobile deployment - Any JavaFX application that adheres to the common profile is portable to mobile and embedded devices. This is huge! Java has brought the same promise of write once, run anywhere to mobile devices, significantly reducing barriers to entry in deployment of truly innovative mobile applications.
Sugrue: When should someone consider using JavaFX over Swing?
Chin: Swing is a mature MVC framework for Java that will have a place for a
long time to come. It remains an excellent choice for writing desktop
applications that match the Look and Feel of the platform. However,
Swing has reached an evolutionary point where it can no longer compete
with graphics-intensive rich internet applications.
JavaFX is specifically targeted at delivering rich internet applications with built-in support for graphics, animation, and media. Through language-specific features such as binding and custom animation syntax, it greatly accelerates the speed at which ideas can be prototyped and delivered.
When choosing which technology to proceed with, some considerations to take into account include:
- Do you have a large investment in Swing application technology?
- The benefits of any new technology like JavaFX rarely outweigh the cost of rewriting existing applications, but consider strategically injecting JavaFX into new application features and development.
- Is your target audience business users or consumer applications?
- Both consumer and business users are becoming increasingly used to rich user experiences on everything from the PCs to their mobile phones, so if end user experience is your goal you should strongly consider JavaFX.
- Will you be using a lot of audio and video in your application?
- JavaFX provides media capabilities right out of the box, making it an excellent choice.
- Do your customers expect a native desktop look and feel?
- A Swing application will fit in much more seamlessly with other desktop applications, and is your best option for this type of application.
- Will you be creating a mobile version of your app?
- JavaFX is the clear winner here with seamless desktop to mobile convergence.
Sugrue: What are your opinions on how JavaFX has been received?
Chin: While there initially was a lot of concern about how the Java community
would receive a new language, a large number of developers have started
embracing JavaFX technology. I am looking forward to JavaOne this
year, because JavaFX is finally ready for the center stage with the
foundation and features needed to build robust applications. The
unveiling of mobile devices for developer use is also very exciting,
and will help to spur the momentum that the JavaFX platform needs to be
Sugrue: Do you think it can compete well with the other RIA frameworks?
Chin: I think JavaFX is well poised to become the defacto-standard in RIA frameworks. A lot of the benefits of JavaFX, such as Java library integration and seamless mobile deployment are extremely hard to replicate in the competing platforms. That said, I also believe that the long term success of JavaFX hinges upon how open the platform is.
Sugrue: What are you most excited about for the future of JavaFX?
Chin: The most exciting feature for me is the mobile support. Mobile devices
are starting to have enough connectivity, screen real-estate, and
horsepower to be viable platforms for next generation applications.
The largest barrier to entry on mobile development today is the custom
tooling and development required for each platform and device. JavaFX
reduces this barrier by providing seamless portability from the desktop
to the phone, eliminating the need to speak a different language based
on the device.
Sugrue: What is the best JavaFX application that you have seen?
Chin: There are quite a few good applications out there to model after. One
of my favorites is TwitterFX,
a Twitter client written in JavaFX by Steven Herod that supports
timelines, messaging, links, TinyURL, TwitPic, and whole host of other
A great place to go to get ideas for building JavaFX applications is JFXStudio. There was just a clever Yahoo Maps mashup posted there this past week, which is a cool use of JavaFX.
Sugrue: What would you like to see added to JavaFX?
Chin: This is an ever-moving target. Sun delivered on a lot of my top
wish-list items in the JavaFX 1.2 release including UI Controls,
Layouts, and Graphing and Charting.
Some additional features that will help further drive adoption of the platform include:
- Web 2.0 Integration - Having an integrated web browser component would greatly open up the possibilities for the type of applications that could be built in JavaFX. This would allow a shift in mindset from embedding JavaFX in large web applications, to making JavaFX the container for web applications. It would also make all sort of web mashups from maps to gadgets to blogs incredibly easy.
- Embedding JavaFX in Java - For those with a heavy investment in Swing and other client technologies, the only path forward is an incremental adoption of JavaFX. While basic Swing components can be embedded in JavaFX, there is no officially supported path to embed JavaFX in Java. We took a first swag at this in the latest JFXtras release, but it would be great to see this become a part of the platform.
- Multi-threading Support - JavaFX needs a better model for execution of long-running tasks written in JavaFX. I have taken a stab at this with the JFXWorker, but it is subject to some pretty strong caveats to prevent deadlocking at the platform level. While JavaFX is already head-and-shoulders above the competition by providing real multi-threading via Tasks and Java workers, a pure JavaFX solution would be more elegant and easier to port to mobile devices.