Sun made a big deal at JavaOne about the new JavaFX family of products. Part of this family is JavaFX Script - yet another scripting language :roll: which I am currently looking into. I am wondering if any other ranch users have worked with JavaFX Script and what your impression is.
Author and all-around good cowpoke
Joined: Mar 22, 2000
The developer who will be most comfortable with JavaFX is going to be somebody already familiar with Swing user interfaces. JavaFX really simplifies the code needed to create Swing GUIs.
It is easy to get started with JavaFX if you are using NetBeans or Eclipse, both IDEs have plugins that help with the syntax. I followed some examples at this introduction. It turns out that the current installation of the plugin for NetBeans is even simpler than that intro shows, but the samples are good.
-- JavaFX Script is in fact a DSL for Swing development. i.e. A major goal is to simplify Swing development, and this drives some of the language constructs.
-- That said, the designer (Chris Oliver?) is a "language philosopher" and has some neat ideas. The language is influenced by a variety of sources, the most interesting of which include XPath/XQuery and SQL.
my syntax might be off but an example is
var myArray = [0..12]; var evenNumbers = myArray[. % 2 == 0];
The "dot operator" implies iteration and acts as the current "node" over the array.
-- A final thought: the language is statically typed. There is a compile phase and then the result is interpreted. This is interesting given the fact that so many dynamically-typed languages are media darlings right now.