RIA Applications Using JavaFX Script Interview

1 view
Skip to first unread message

Harshad Oak

unread,
Mar 21, 2008, 2:50:59 AM3/21/08
to Groov...@googlegroups.com
Hi,
 
Check out this interview with Jim Weaver, one of the best known names in the JavaFX world. He talks about JavaFX Script, where it stands today, how it compares to other RIA technologies and where JavaFX looks headed. Jim gives us an overview of the development cycle for a JavaFX Script application. He also talks about the benefits of using JavaFX and the challenges faced in its adoption
 
 
Below is an excerpt -
 
Harshad Oak >> Hi Jim. Welcome to this interview with IndicThreads. Could you introduce yourself?

Jim Weaver >> Hello Harshad. Thanks for this opportunity. I'm Jim Weaver, known most recently as a JavaFX Script author, speaker and blogger. I've been developing Java applications since 1995, and during that time have co-authored a few books on Java and J2EE.

Harshad Oak >> Let's look at the questions that first come to mind when one thinks of JavaFX 1) Why another language? 2) Where do I place JavaFX; is it a new language / a framework / a toolkit... ?

Jim Weaver >> Why another language? I like the way that Josh Marinacci of Sun put it in a recent Java Posse interview: "JavaFX is sort of a code word for reinventing client Java and fixing the sins of the past". Both Java Swing and Java 2D have lots of capability, but are also very complex. You can use a GUI developer tool that generates code, but I'm never satisfied with that code. JavaFX Script allows you to simply and elegantly express a UI, including cross-platform layout components, with a declarative programming style. It also leverages the full power of Java, because you can instantiate and use the millions of Java classes that exist today directly from JavaFX Script. Add features like binding the UI to attributes in a model, and triggers that obviate the need for setter methods, and you have a language that is an order of magnitude faster and easier to use than traditional client Java.

"Java Swing and Java 2D have lots of capability, but are also very complex...."

Regarding where to place  JavaFX: It is a family of "products" that includes JavaFX Mobile (a complete software stack for mobile devices) and  JavaFX Script. JavaFX Script is a declarative programming language that is fully object-oriented and statically typed. See the http://javafxpert.com/weblog/2008/01/want-to-learn-c.html post in my "Helping you become a JavaFXpert" weblog for some example code. I'm also writing for Sun a series entitled "Creating Rich Internet Applications with Compiled JavaFX Script Technology".

"JavaFX is an order of magnitude faster and easier to use than traditional client Java...."

Harshad Oak >> Could you give us a high level overview of the steps involved in developing and deploying a bare bones JavaFX Script application and a JavaFX Mobile application?

Jim Weaver >> First I need to say that there are two versions of JavaFX Script in use today: The interpreted version, which is essentially a prototype, and the "real" version, which is compiled into JVM bytecode. The interpreted version has IDE plug-in support, so the development cycle can be very IDE-centric. I've been encouraging developers to move to compiled JavaFX Script because it's getting pretty solid, however IDE support isn't quite there yet. The development cycle that I use for compiled JavaFX Script is:

  • Declaratively express the UI, while designing the classes that represent the model behind the UI, binding the UI to the model as appropriate. All source code is in files with an FX extension.
  • Use the javafxc command-line tool to compile the FX source code.
  • Use the javafx tool (appletviewer in the case of applets) to run the program. By the way, see the link to the article I mentioned a bit ago to learn how to obtain the JavaFX Script compiler, and use the javafxc and javafx tools.
  • To deploy the program, make it available via Java Web Start (JNLP), or via a browser.
.........

Reply all
Reply to author
Forward
0 new messages