JavaFX Script
   HOME

TheInfoList



OR:

JavaFX Script was a
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scripting ...
designed by
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
, forming part of the
JavaFX JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linu ...
family of technologies on the
Java Platform Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cro ...
. JavaFX targeted the
Rich Internet Application A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
domain (competing with
Adobe Flex Apache Flex, formerly Adobe Flex, is a software development kit (SDK) for the development and deployment of cross-platform rich web applications based on the Adobe Flash platform. Initially developed by Macromedia and then acquired by Adobe System ...
and
Microsoft Silverlight Microsoft Silverlight is a discontinued application framework designed for writing and running rich web applications, similar to Adobe Inc., Adobe's Run time environment, runtime, Adobe Flash. A plugin for Silverlight is still available for a v ...
), specializing in rapid development of visually rich applications for the desktop and mobile markets. JavaFX Script works with
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
s such as
NetBeans NetBeans is an integrated development environment (IDE) for Java (programming language), Java. NetBeans allows applications to be developed from a set of modular software components called ''modules''. NetBeans runs on Microsoft Windows, Windows, ...
,
Eclipse An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three ce ...
and
IntelliJ IDEA IntelliJ IDEA is an integrated development environment (IDE) written in Java (programming language), Java for developing computer software written in Java, Kotlin (programming language), Kotlin, Groovy (programming language), Groovy, and other ...
. JavaFX is released under the
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the Four Freedoms (Free software), four freedoms to run, study, share, and modify the software. The license was th ...
, via the Sun sponsored OpenJFX project.


History

JavaFX Script used to be called F3 for Form Follows Function. F3 was primarily developed by Chris Oliver, who became a
Sun The Sun is the star at the center of the Solar System. It is a nearly perfect ball of hot plasma, heated to incandescence by nuclear fusion reactions in its core. The Sun radiates this energy mainly as light, ultraviolet, and infrared radi ...
employee through their acquisition of
SeeBeyond Technology Corporation Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
in September 2005. Its name was changed to JavaFX Script, and it became
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
d at
JavaOne __NOTOC__ JavaOne is an annual conference first organized in 1996 by Sun Microsystems to discuss Java technologies, primarily among Java developers. It was held in San Francisco, California, typically running from a Monday to Thursday in summer ...
2007. JavaFX 1.0 was released on December 4, 2008. On September 10, 2010 Oracle announced at
JavaOne __NOTOC__ JavaOne is an annual conference first organized in 1996 by Sun Microsystems to discuss Java technologies, primarily among Java developers. It was held in San Francisco, California, typically running from a Monday to Thursday in summer ...
that JavaFX Script would be discontinued, although the JavaFX API would be made available to other languages for the Java Virtual Machine. On September 27, 2010 Stephen Chin announced Visage a declarative user-interface language based on the JavaFX Script with enhancements. On April 8, 2012 a project was created with the intention of resurrecting and enhancing the original F3 programming language, but the project appears to have been discontinued in August 2015.


Features

JavaFX Script was a compiled,
statically typed In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
, declarative
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scripting ...
for the
Java Platform Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cro ...
. It provided automatic data-binding, mutation triggers and declarative animation, using an expression language syntax (all code blocks potentially yield values.) Through its standard
JavaFX JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linu ...
APIs it supported
retained mode Retained mode in computer graphics is a major pattern of API design in graphics libraries, in which * the graphics library, instead of the client, retains the scene (complete object model of the rendering primitives) to be rendered and * the ...
vector graphics, video playback and standard Swing components. Although F3 began life as an interpreted language, prior to the first preview release (Q3 2008) JavaFX Script had shifted focus to being predominantly compiled. Interpreted JavaFX Script is still possible, via the
JSR 223 Scripting for the Java Platform is a framework for embedding scripts into Java source code. There is no requirement for a given Java virtual machine (JVM) to include any engines by default, but the Oracle JVM (Java 6 and later) includes a JavaScr ...
'Scripting for Java' bridge. Because it is built on top of the
Java Platform Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cro ...
, it is easy to use
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
classes in JavaFX Script code. Compiled JavaFX Script was able to run on any platform that has a recent Java Runtime installed.


Syntax

JavaFX Script's declarative style for constructing user interfaces can provide shorter and more readable source code than the more verbose series of method calls required to construct an equivalent interface if written in JavaFX Script's procedural style. Here is a simple
Hello world program ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the ''Norwich C ...
for JavaFX Script : import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Text; import javafx.scene.text.Font; Stage It shows the following window/frame : This program can also be written in JavaFX Script using a procedural style this way: import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Text; import javafx.scene.text.Font; javafx.scene.text.Font". var myFont:Font = Font.font(null, 24); var myText:Text = new Text(); myText.font = myFont; myText.x = 10; myText.y = 30; myText.content = "Hello World"; var myScene:Scene = new Scene(); myScene.content = myText; var myStage:Stage = new Stage(); myStage.title = "Hello World"; myStage.width = 250; myStage.height = 80; myStage.scene = myScene;


See also

*
Java applet Java applets were small applications written in the Java programming language, or another programming language that compiles to Java bytecode, and delivered to users in the form of Java bytecode. The user launched the Java applet from a ...
, a means of deploying Java applications inside a web page. *
JavaFX JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linu ...
, a family of products and technologies intended to be used to create Rich Internet Applications (RIAs). * Swing, the underlying user interface library employed by JavaFX Script. *
Curl (programming language) Curl is a reflective object-oriented programming language for interactive web applications whose goal is to provide a smoother transition between formatting and programming. It makes it possible to embed complex objects in simple documents withou ...
, also with a declarative mode with optional typing


References


Bibliography

* * * * * *


External links


JavaFX Main Site

Sun's JavaFX overview

Chris Oliver's blog, F3 category

James Weaver's Learn JavaFX Weblog

Sun.com - Learning JavaFX Script: An Introduction for Java Programmers


(
New York Times ''The New York Times'' (''the Times'', ''NYT'', or the Gray Lady) is a daily newspaper based in New York City with a worldwide readership reported in 2020 to comprise a declining 840,000 paid print subscribers, and a growing 6 million paid d ...
article) * (
CNET ''CNET'' (short for "Computer Network") is an American media website that publishes reviews, news, articles, blogs, podcasts, and videos on technology and consumer electronics globally. ''CNET'' originally produced content for radio and televi ...
article)
Planet JFX Community Wiki
(how-to's, code samples, tutorials) {{DEFAULTSORT:JavaFX Script Declarative programming languages Java programming language family JVM programming languages Scripting languages