Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

JavaFX

Ravi Kumar Dhawan


Computer Science and Engineering (2007-11)
ravikumardhawan@gmail.com

Abstract

JavaFX is the best software for creating feature-rich applications that deliver secure and
expressive cross-platform user experiences. Building on the Java Platform, JavaFX benefits from a
compelling mix of ubiquity, capability, performance, and an unmatched developer community. With
JavaFX, Oracle is empowering millions of Java developers to leverage their existing skills to directly
create and maintain advanced client applications that exceed user experience expectations. And with
the JavaFX SDK, developers and designers now have the essential set of technologies, tools, and
resources to easily create and deploy their content across browsers, desktops, mobile devices, TVs,
and other connected devices.

Introduction
JavaFX is a Java platform for creating and delivering rich Internet applications that can run
across a wide variety of connected devices. The current release (JavaFX 1.3, April 2010) enables
building applications for desktop, browser and mobile phones. TV set-top boxes, gaming consoles,
Blu-ray players and other platforms are planned. To build JavaFX apps developers use a statically
typed, declarative language called JavaFX Script; Java code can be integrated into JavaFX programs.
JavaFX is compiled to Java byte code, so JavaFX applications run on any desktop and browser that
runs the Java Runtime Environment (JRE) and on top of mobile phones running Java ME. On
desktop, the current release supports Windows XP, Windows Vista and Mac OS X operating
systems. On mobile, JavaFX is capable of running on multiple mobile operating systems, including
Symbian OS, Windows Mobile, and proprietary real-time operating systems. Commentators have
speculated JavaFX will compete on the desktop with Adobe Flash Player, Adobe AIR, OpenLaszlo
and Microsoft Silverlight. JavaFX is based on the concept of a “Common profile” that is intended to
span across all devices supported by JavaFX. This approach makes it possible for developers to use a
common programming model while building an application targeted for both desktop and mobile
devices and to share much of the code, graphics assets and content between desktop and mobile
versions. From the point of view of the end user “Drag-to-Install” allows them to drag a JavaFX
widget (or application residing in a website and is visible within the browser window) and drop it
onto their desktop. The application will not lose its state or context even after the browser is closed.
JavaFX includes a set of plug-ins for Adobe Photoshop and Illustrator that enable advanced graphics
to be integrated directly into JavaFX applications. The plug-ins generates JavaFX Script code that
preserves layers and structure of the graphics. Developers can then easily add animation or effects to
the static graphics imported
The JavaFX platform gives you unparalleled freedom and flexibility to create expressive content
across multiple screens, including mobile devices, desktops, televisions, and other consumer devices.
It combines the best capabilities of the Java platform with comprehensive, immersive media
functionality into an intuitive and comprehensive one-stop development environment. The JavaFX
platform empowers content developers by enabling them to focus on creativity instead of coding. It
enables developers to create game-changing applications and engaging content with maximum
market penetration opportunities.

The JavaFX platform is architected to support multiple scripting languages, and based on
customer demand, can be extended to support ECMA-based languages as well as XML-based visual
markup languages. JavaFX Script is designed for web scripters and content authors who like to
program in a visual context. It is easy to learn and provides a simple, declarative syntax that will
appeal to Web developers. JavaFX brings together graphics, animation, rich text, audio, and video to
quickly allow developers to create rich, immersive applications. The Java programming language, on
the other hand, is more suited for applications that are heavy in logic and require extensive back-end
integration. JavaFX also enables a highly efficient designer-developer workflow. Hence JavaFX
extends the power of Java by providing your Java applications with a more powerful and expressive
presentation layer.

The relationship between Java and JavaFX


JavaFX is an expressive rich client platform for creating and delivering rich Internet
experiences across all screens of your life. It is fully integrated with the Java Runtime and takes
advantage of the performance and ubiquity of the Java Platform. JavaFX applications will run on any
desktop and browser that runs the Java Runtime Environment and easily integrates with Java ME,
opening up the door to billions of mobile phones, televisions and other connected devices!

JavaFX applications are written using a statically typed, declarative language called JavaFX
Script that makes it easy to program in a visual context thus enabling developers to create highly
expressive GUIs quickly and easily. JavaFX provides a rich set of libraries for graphics, media and
Web services that developers can use in their applications. In addition, developers can use any Java
library in their JavaFX applications. This allows JavaFX applications to take advantage of the rich
JavaFX UI libraries, as well as the amazing breadth of functionality offered by Java.

The components of the JavaFX platform


The JavaFX platform includes the following components:
• The JavaFX SDK: Includes the JavaFX compiler and runtime tools, graphics, media, web
services, UI controls and rich text libraries to create RIAs for the desktop, browser, mobile
and television platforms.
• NetBeans IDE for JavaFX: Provides a sophisticated integrated development environment
for building, previewing, and debugging JavaFX applications. The editor features a drag-and-
drop palette to quickly add JavaFX objects with transformations, effects and animation. The
IDE also comes with its own set of JavaFX samples and best practices.¢
• JavaFX Production Suite: A suite of tools and plugins for creative tools that allows
graphical assets to be exported to JavaFX applications. The suite consists of:
o JavaFX plugins for creative tools: A set of plugins for Adobe Photoshop CS3 and
Adobe Illustrator CS3 & CS4 that can export graphics assets into a JavaFX
compatible file format
o JavaFX Media Factory: A set of tools to convert SVG graphics into JavaFX Script
code and preview graphics assets converted to JavaFX from other tools. Sample
applications, tutorials, articles, API documentation, and sample code
• With JavaFX Mobile, Oracle is bringing expressiveness to the most powerful and pervasive
mobile platform. On mobile devices, JavaFX runs directly on Java ME to take advantage of
its ubiquity, security, and highly capable feature-set. According to Ovum Research, there are
over 2.6 Billion Java-based handsets in use, worldwide. 8 out of 10 handsets shipped in 2008
were running Java technology, spanning low-end feature-phones to high-end smartphones.
Through the Java Platform, developers can enable their applications to securely access all of
the capabilities of the underlying handset, such the filesystem, camera, GPS, bluetooth and
more!
• With JavaFX Mobile, developers and designers benefit from using the same JavaFX tools
such as the JavaFX SDK and the JavaFX Production Suite. that they have been using to
create content for the desktop and browser. This makes it much easier to start creating mobile
content and opens up the mobile device to a much wider pool of developers and designers.

Advantageous for consumers


Used on Handsets and TV Devices:-
JavaFX can be available on the handsets and TV devices of the consumers
Oracle will be working with Device Manufacturers and Operators to enable out of
the box support for JavaFX content by preloading the JavaFX Mobile runtime with
their devices. Support for developing Mobile and TV applications is available in
the JavaFX SDK today.

• JavaFX Mobile compare with platforms such as Android, iPhone, or Windows Mobile:-
Building on top of Java ME, JavaFX Mobile brings expressiveness to the most
powerful and pervasive mobile platform. As such, JavaFX Mobile enables the
mobile industry to extend & leverage their investment in wireless Java.
Developers can build more expressive experiences while using existing skills,
tools and libraries. OEMs and Operators can extend their platform
implementations and developer programs while opening the door to richer,
vibrant content and expanding the number of people that can create content for
their devices. In addition, JavaFX Mobile is an independent application platform,
built on Java, that is capable of running across nearly any mobile operating
system, including Android, Windows Mobile, and proprietary real-time operating
systems. In addition, the JavaFX platform spans desktop, browser and mobile,
enabling developers and designers to create consistent, expressive content
across all the screens of our lives. JavaFX is capable of running on nearly any
mobile operating system, assuming the necessary runtime files have been
preloaded on the device. Device manufacturers that are interested in including
JavaFX Mobile with their Android-based handsets are encouraged to contact
Oracle for further details. JavaFX is a platform for developing rich, expressive
content that can be deployed across desktop, mobile and television. Content
written in JavaFX runs on top of the Java platform. On mobile and television, this
means JavaFX apps will run on Java ME, opening the door to bringing JavaFX to
billions of devices.
JavaFX Script :-
JavaFX Script is a simple declarative language designed for creative
developers who like to program in a visual context. It's easy-to-learn and
familiar syntax allows content authors to write in a format that closely matches
the layout of graphical user interfaces. A core strength of the language is it's
unique data binding feature, which is a simple syntax for synchronizing the
state of multiple objects, thus allowing GUI components to automatically change
state with changes in underlying data. The language is fully object-oriented,
complete with method and attributes, thus allowing expert programmers to
build highly complex and robust interfaces.

The advantages of JavaFX Script over JavaScript and


ActionScript
JavaFX Script is a scripting environment that is better suited than
JavaScript or ActionScript to take advantage of Java's ubiquity on the desktop,
mobile and television devices, as well as on other consumer electronics. With
JavaFX Script developers can provide deep integration with the Java Runtime
environment by reusing any Java Library in a JavaFX application.

In addition, JavaFX Script is primarily designed for web developers and


technical designers who like to program in a visual context. And at the same
time, the language is fully object-oriented, complete with method and
attributes, thus allowing expert programmers to build highly complex and
robust interfaces.

The Backword Compatibility


The power of Java by using any Java library within a JavaFX application.
This way one can preserve your investment in Java and use JavaFX to build
engaging visual experiences.The proven security model of Java can be
leveraged to securely deploy JavaFX applications and access system resources
such as file system and system devices. And because JavaFX applications are
compiled to Java byte-code, they take advantage of the dynamic Java HotSpot
Virtual Machine to get the best possible performance.

Benefits
• Create more advanced content— The best platform for cross-platform Rich Internet
Applications (RIAs) that securely leverage more of the underlying system. Building off the
powerful multitasking Java Virtual Machine, JavaFX lets you do more with your cross-platform
content.
• Leverage Java Investment—Empowers more people to create rich, immersive experiences that
easily integrate audio, video, animation, rich text, and Web services—because its built on Java,
one of the most widely deployed technologies with one of the largest developer communities in
the world.
• Accelerate development cycles—Delivers an intuitive workflow through highly effective
separation of logic, interaction model, and design that enables rapid prototyping and adds
flexibility to your project.
• Reduce project risk—Builds on familiar Java technology to enable companies to be more
effective and gain more control over their projects by utilizing existing in-house expertise,
leveraging existing Java libraries, and integrating with Java infrastructure more easily.
• One-stop-shop expressive content design and development platform for all screens: Build
engaging visual experiences across desktop, browser, mobile, and television with a unified
development and deployment model. The most powerful and pervasive platform in the industry
is now the most expressive!
• Broadest market reach: Devices will be opened up to the broadest portfolio of content and
services in the industry. Applications can be distributed across billions of devices through the
power of Java. Mobile and TV developers can efficiently target their content to as many
devices as possible.
• Broadest access to mobile on-device capabilities: JavaFX is the best way to bring
expressive, feature-rich content to mobile and television devices. JavaFX Mobile brings
expressiveness to Java ME, to combine the richest mobile experience with the most access to
the underlying system and across the broadest number of devices.
• Lower implementation cost: Builds on your pre-existing investment in Java. Developers can
use any Java library within a JavaFX application to build expressive interfaces. In mobile
devices, JavaFX builds on top of the existing Java ME platforms to reduce implementation
costs for device manufacturers.
• Designer-developer workflow: Dramatically shorten your production cycle for design and
development by using JavaFX Production Suite to incorporate multimedia assets from popular
third-party design tools.
• Powerful runtime: Leverage the extreme ubiquity, power, performance and security of the
Java runtime.
• Break free from the browser: With Java SE 6 update 10 and beyond, you can drag-to-Install
applications from your browser directly onto your desktop. This innovative feature is an
industry first and provides developers with new channels to get their content to their target end
users.

JavaFX Platform Components

The JavaFX platform architecture is shown in the following figure.


The JavaFX platform contains cross-platform and platform-specific runtime environments
and support libraries. It includes a declarative language called JavaFX Script, as well as a set of
development and design tools. This ensures that applications can provide a consistent look and feel
across devices with diverse form factors and capabilities.
In a fast changing world of technology, a new framework, language or a methodology is
introduced before we get time to master the previous one. It is a great challenge for software
professionals to keep acquiring new skills. And it takes time and effort to learn new technology!

Comparison

In conclusion, let me organize some information in the following table.


Flex Silverlight JavaFX

Version 3.0 1.1 Alpha 1.3


Built-in UI
Yes Very limited to none Via Swing
Controls

Visual Studio 2008

.NET Platform 3.5


Netbeans 6.01
Flex Builder 3.0
IDE (Eclipse platform) Silverlight 1.1 Alpha
JavaFX plugin
Visual

Studio 2008 Template


IDE Visual
Yes No Yes
Design
IDE Toolbar for
Yes No Yes
Controls
Java Plugin with JavaFX
Browser Client Adobe Flash Player 9 Silverlight 1.1 Alpha
extension

XAML
MXML JavaFX Script
Languages JavaScript
Action Script Java
(C#, VB.Net, ASP.Net)

References-
• http://en.wikipedia.org/wiki/JavaFX
• http://javafx.com/about/overview/
• http://www.oracle.com/us/products/tools/050854.html
• http://vinaytechs.blogspot.com/2009/10/microsoft-silverlight-vs-sun-javafx-vs.html
• http://download.oracle.com/javafx/index.html
• http://javafx.com/faq/
• http://www.oracle.com/technetwork/java/javafx/overview/index-jsp-139879.html

You might also like