As we are closing this year, people tend to write predications for the next year. Usually you see something like “Top 10 predications for next year”. I will offer you just one prediction. My predication is that JavaFX will start to emerge as a technology for building Rich Internet Applications. JavaFX Script is a declarative language for building rich user interfaces using Java. In a way it’s Swing for the Web using declarative scripting language which makes it much simpler to develop user interfaces. For general comparison, JavaFX is similar to Adobe Flex and Microsoft Silverlight technologies.
While JavaFX consists of JavaFX Mobile and JavaFX Script, I’m talking about JavaFX Script in this post and referring to it as JavaFX.
While still in early stages, I believe next year JavaFX will start to gain momentum. Sun will most likely push JavaFX even more at JavaOne 2008 in May.
We all know that Java is excellent on the server side, but it was missing in action on the UI side. Yes, we have Swing (or Applets). But developing rich user interfaces with these technologies is challenging. If we want to build a browser-based application, then we can use JSF – component based framework. While JSF is an excellent technology, we are still getting a browser-based (read HTML, JavaScript) application. There is only so much we can do within a web browser. If we want to take it further, today we can use Adobe Flex or Microsoft Silverlight to deliver richer applications. That’s exactly where JavaFX comes in. It will allow to build Rich Internet Applications using Java. The Consumer JRE to be released next year will make it easier to download, install and update JavaFX applications.
Why would anyone consider JavaFX in 2008 and not Flex? Well, first of all it’s Java-based, so it would be natural to consider for any application already written in Java. Second, its ability to interact with existing Java code makes it a great technology for building Rich Internet Applications.
Here is a quick example of Hello World using JavaFX Script:
import javafx.ui.*; import javafx.ui.canvas.*; import javax.swing.UIManager; import sun.swing.plaf.nimbus.NimbusLookAndFeel; UIManager.setLookAndFeel(new NimbusLookAndFeel()); Frame { title: "HelloWorld" height: 100 width: 150 content: [ SimpleLabel { text: "Hello World - JavaFX" } ] visible: true }
The result:
Here is a great place to start learning about JavaFX: James Weaver’s JavaFX Blog.
Happy New Year!
Leave a Reply