JavaFX Script
From Wikipedia, the free encyclopedia
| JavaFX Script | |
|---|---|
![]() |
|
| Developed by | Sun Microsystems |
| Latest release | Alpha |
| OS | Cross-platform |
| Genre | Scripting language |
| License | GNU General Public License |
| Website | JavaFX Script Website |
JavaFX Script is a scripting language designed by Sun Microsystems, forming part of the JavaFX family of technologies on the Java Platform. JavaFX targets the Rich Internet Application domain (competing with Adobe Flex and Microsoft Silverlight), specializing in rapid development of visually rich applications for the desktop and mobile markets. JavaFX Script works with integrated development environments like NetBeans and Eclipse. JavaFX is released under the GNU General Public License, via the Sun sponsored OpenJFX project,
Contents |
[edit] History
JavaFX Script used to be called F3 for Form Follows Function. F3 was primarily developed by Chris Oliver, who became a Sun employee through their acquisition of SeeBeyond Technology Corporation in September 2005.
Its name was changed to JavaFX Script, and it became open sourced at JavaOne 2007.
It is currently in alpha stage,[1] and all the code, documentation and demos are shared in the Project OpenJFX Development Website.
[edit] Features
JavaFX Script is a compiled statically typed declarative scripting language for the Java Platform providing automatic data-binding, full support for 2D graphics and standard Swing components as well as declarative animation. Because it is built on top of the Java Platform, it is easy to use any Java class in JavaFX scripts.
JavaFX is able to run on any platform which has the Java Runtime installed. No modifications are needed since the JavaFX interpreter generates default Java bytecode. A compiler is planned for the future that will improve performance by compiling JavaFX directly into bytecode.
JavaFX Script's declarative syntax for constructing user interfaces contrasts sharply with the more verbose series of method calls required to construct an equivalent interface in Swing directly.
[edit] Examples
Here is a simple Hello world program for JavaFX Script :
Frame {
title: "Hello World F3"
width: 200
content: Label {
text: "Hello World"
}
visible: true
}
It shows the following panel :
This program can also be written in this way:
var win = new Frame(); win.title = "Hello World F3"; win.width = 200; var label = new Label(); label.text = "Hello World"; win.content = label; win.visible = true;
[edit] Prerequisites
All you need is a Java SE 5 or Java SE 6 for the support to JavaFX Scripting development. You can start developing your first application on JavaFX with your Eclipse or NetBeans 5.5 or later IDEs and by incorporating the necessary plugins for them.
[edit] References
[edit] Books
- James, L. Weaver (October 29). JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications, First Edition, ISBN 978-1590599457, Apress.
[edit] See also
- Ajax
- Java applet, a means of deploying Java applications inside a web page.
- JavaFX, a family of products and technologies intended to be used to create Rich Internet Applications (RIAs).
- Silverlight, a rival technology from Microsoft.
- Swing, the underlying user interface library employed by JavaFX Script.
[edit] External links
- JavaFX Main Site
- Sun's JavaFX overview
- Chris Oliver's blog, F3 category
- James Weaver's Learn JavaFX Weblog
- www.javafxworld.net - First community Portal for JavaFX
- Sun.com - Learning JavaFX Script: An Introduction for Java Programmers
- Sun Plans Version of Java for Web-Linked Cellphones (New York Times article)
- Sun tries again with consumer-flavored Java (CNET article)
- Planet JFX Community Wiki (how-to's, code samples, tutorials)
- Swing/JavaFx tutorials (Russian language)
|
||||||||||||||||||||


