In this post I want to share with you some things about JavaFX Script, leading up to our company's (LAT, Inc.) perspective and plans for using JavaFX Script.
- JavaFX Script's relationship to Java
- Some features and advantages of JavaFX Script
- The current status of JavaFX Script
- Two very informative JavaFX Script mailing lists.
- Our company's plans for using JavaFX Script
Some of the content in this post is from my Apress book: JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications.
JavaFX Script’s Relationship to Java
If you’ve done much Java development, especially Java Swing development, you know that Java and Java Swing have an amazing amount of functionality, and at the same time are very complex.
JavaFX leverages all of the power of Java, because JavaFX code can fully utilize the Java libraries. For example, it can call methods of, and instantiate, Java classes. Much of the user interface (UI) capability of JavaFX makes use of the Java Swing classes behind the scenes.
The net effect is that content developers and application developers can use a simple and elegant language that harnesses the power of Java and Java Swing. I am excited about how JavaFX has found, in the words of Albert Einstein, the “simplicity on the other side of complexity.”
Features and Advantages of JavaFX Script
The following list describes some of the strengths of JavaFX Script:
- Its simple, declarative syntax used to express user interfaces, including a very rich set of layout widgets that make easy work of laying out a user interface in a platform-independent way. Content developers can create great looking, functional user interfaces without being expert programmers.
- Its innate ability to support the model-view-controller pattern because of its very powerful bind capability. This complements and enables the declarative programming syntax because attributes of objects, including user interface objects, can be bound to values contained in model classes, often bidirectionally.
- The concept of triggers (functionality that is automatically invoked when certain conditions take place, such as when the value of an attribute changes). This enables the declarative syntax as well, and makes UI development relatively easy, because setters and getters are replaced by triggers that are automatically invoked when the value of an attribute changes.
- JavaFX programs will run anywhere Java programs will run, because they run within the context of a Java Virtual Machine (JVM). There is a project underway, called the OpenJFX Compiler Project, whose mission is to create a compiler for JavaFX code that will turn it into JVM bytecode. When this is fully implemented, execution speeds of JavaFX Script will rival Java code.
- Its very powerful syntax for defining, modifying, and querying sequences (think arrays).
A side benefit is that it is enables fast development of application prototypes. Another side benefit is that it would be a great language to use in schools to teach programming concepts.
Current Status of JavaFX Script
JavaFX Script, with the help of Java libraries, is currently very functional and reliable. JavaFX Script syntax is in a state of flux as it is continually being improved, and JavaFX Script class libraries are being fleshed out continually. Because Project OpenJFX is an open project, the JavaFX community is contributing to the ideas and development of JavaFX Script. This community, which includes development tool providers, will continually improve the capability of JavaFX Script development tools, adding capabilities such as refactoring. JavaFX Script is currently under an evaluation license, but will soon be open source.
Two Very Informative Mailing Lists
There are several forums and mailing lists associated with Project OpenJFX and OpenJFX Compiler projects. The forums are web-based and require more effort to answer posts, so very little useful information is currently exchanged on them. There are a couple of mailing lists, on the other hand, that are very informative and useful for getting questions answered. These are:
- email@example.com - a mailing list for discussions about the current, interpreted version of JavaFX Script. You can subscribe to this list and view archives from this page.
- firstname.lastname@example.org - a mailing list whose content is mainly communication among the team of people that are carrying the effort of creating the compiler version of the JavaFX Script language, and of course the compiler itself. Judging by the messages on the list, this team of compiler and language design gurus is working around the clock, including on weekends, to make this happen. I have a high degree of respect for this team, and mostly just lurk, gleaning what I can from the *very* technical discussions. Sometimes I understand enough of what they are talking about to actually offer some input :). You can subscribe to this list and view archives from this page.
Our Company's Plans for using JavaFX Script
"I am using currently JavaFX on projects that aren't mission critical (e.g. internal utilities such as an object database browser). I have found it to be very reliable, but do recognize that the syntax of the language is undergoing some significant changes. This will require modifying the code at some point, but the benefits of using JavaFX now in my experience have outweighed the anticipated work in modifying code. It is my understanding that the user interface APIs will be expanded, but not radically changed.
After the compiled version of JavaFX Script is released and feels stable, we'll begin using JavaFX Script for some customer applications and some of our products. I expect that to occur for us in Q2 2008. What I'm really hoping for in the 2008-early 2009 timeframe is that the deployment for JavaFX applications (including the JRE) will be so fast and easy that we'll be writing rich-client JavaFX applications in most cases (rather than defaulting to browser-based applications)."
As always, your feedback in the form of comments to this post are encouraged.
James L. (Jim) Weaver
JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications