What Is JavaFX?
The JavaFX platform is the evolution of the Java client platform designed to enable application developers to easily create and deploy rich internet applications (RIAs) that behave consistently across multiple platforms. Built on Java technology, the JavaFX platform provides a rich set of graphics and media API with high-performance hardware-accelerated graphics and media engines that simplify development of data-driven enterprise client applications.
Investing in the JavaFX platform provides the following advantages to Java developers and companies that are part of the Java ecosystem:
- Because the JavaFX platform is written in Java, Java developers can leverage their existing skills and tools to develop JavaFX applications.
- Because Java is widely used, it is easy to find experienced Java developers who can quickly become productive building JavaFX applications.
- By using a homogenous set of Java technologies for both the server and the client platforms, the JavaFX platform reduces the risk of investment by reducing the complexity of the business solutions.
- Development costs are also reduced because of the aforementioned advantages.
- The JavaFX platform provides developers with a development framework and runtime environment to create enterprise and business applications that run across multiple platforms that support Java.
See the JavaFX Architecture and Framework document to learn about the JavaFX platform's architecture and key concepts.
A Brief History of JavaFX
At the JavaOne 2007 conference, Sun Microsystems introduced the JavaFX platform to help content developers and application developers to create content-rich applications for mobile devices, desktops, televisions, and other consumer devices. The initial offering consisted of the JavaFX Mobile platform and the JavaFX Script language. Multiple public releases were delivered after the initial announcement; the 1.3 version was released on April 22, 2010.
After Oracle's acquisition of Sun Microsystems, Oracle announced during the JavaOne 2010 conference that support for the JavaFX Script language would be discontinued. However, it was also announced that the JavaFX Script APIs will be ported to Java and would be released as part of the JavaFX 2.0 product. This announcement meant that the JavaFX capabilities will become available to all Java developers, without the need for them to learn a new scripting language. With this announcement, Oracle has committed to making JavaFX the premier environment for rich client applications.
What's New in JavaFX 2.0?
The main focus areas for the JavaFX 2.0 release include the following:
- Java APIs for JavaFX that provide all the familiar language features (such as generics, annotations, and multithreading) that Java developers are accustomed to using. The APIs are designed to be friendly to alternative JVM languages, such as JRuby and Scala. Because the JavaFX capabilities are available through Java APIs, you can continue to use your favorite Java developer tools (such as IDEs, code refactoring, debuggers, and profilers) to develop JavaFX applications.
- A new graphics engine to handle modern graphics processing units (GPUs). The basis of this new engine is a hardware accelerated graphics pipeline, called Prism, that is coupled with a new windowing toolkit, called Glass. This graphics engine provides the foundation for current and future advancements for making rich graphics simple, smooth, and fast.
- FXML, a new declarative markup language that is XML-based and is used for defining the user interface in a JavaFX application. It is not a compiled language and, hence, does not require you to recompile the code every time you make a change to the layout.
- A new media engine that supports playback of the web multimedia content. It provides a stable, low latency media framework that is based on the GStreamer multimedia framework.
- A web component that gives the capability of embedding web pages within a JavaFX application using the WebKit HTML rendering technology. Hardware accelerated rendering is made available using Prism.
- A refreshed browser plug-In for JavaFX 2.0 that allows the loading of JavaFX applets based on Prism.
- A wide variety of built-in UI controls, which include Charts, Tables, Menus, and Panes. Additionally, an API is provided to allow third parties to contribute UI controls that the user community can use.
- Sample applications that showcase the different features of the JavaFX 2.0 technology, along with a large number of code samples and snippets.
What Can I Build with JavaFX?
Table 1 shows thumbnail images of some of the sample JavaFX applications that are included with the JavaFX 2.0 release. Click each thumbnail to view a larger image of the application.
To run these and additional sample applications, go to
http://www.oracle.com/technetwork/java/javafx/downloads/index.html
. Download the zip file that contains the JavaFX 2.0 Samples and extract the files. The javafx-samples-2.0\
directory is created.Samples are in the javafx-samples-2.0\
directory. You can run a sample by double clicking one of its executable files. For example, to run the Ensemble application, double-click the Ensemble.jar
file. NetBeans projects for the samples are in the javafx-samples-2.0\src
directory. Make sure to refer to the JavaFX System Requirements document for the supported version of NetBeans IDE that you need to run these NetBeans projects for the samples.Deployment
JavaFX applications can be deployed on a desktop or in a browser in three different deployment modes:
- Standalone – The JavaFX application is installed on a local drive and is run by double-clicking the JAR file. This mode is ideal when users do not need or do not have online access.
- Browser – In this mode, the JavaFX application is embedded in a web page and is started automatically when the web page is accessed. It can interact with the web page through JavaScript.
- Web Start – This mode downloads the application from a central location on the web and then runs it on the desktop. Once it is downloaded, users can start the application by double-clicking the JNLP file.
0 comments:
Post a Comment