James Weaver

+ Follow
since Oct 11, 2007
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Weaver

Just a note of thanks for your great questions, kindness, and hospitality at the JavaRanch this week! If you have any additional questions, please post comments on the weblog in my signature. By the way, I just posted a public thanks to you on my weblog.
Please articulate the question further.
Not that I know of. But it is available as an immediate PDF download for about 18 USD at:
JavaFX programs can be deployed via Java Web Start or as applets in a browser. For the latter, see my Creating Compiled JavaFX Script Applets - Method Two post.

JavaFX Script programs execute in a JVM on the user's machine.
That's a valid concern. If the JavaFX Script program has the "operation" keyword, it's interpreted, because the compiled version combined "function" and "operation". Also, static variables used as constants are a give-away (e.g. Color.RED). The Rosetta Stone post contains some other differences. It also contains a link to a nice PlanetJFX article on the subject.
There are two versions of JavaFX: The interpreted version served as a prototype. That is most likely the version that you are using. The "real" version of JavaFX Script is the compiled version, which compiles to JVM bytecode. You can compile and execute compiled JavaFX Script programs from the command line, or using the NetBeans 6.1 (currently beta) IDE with the JavaFX Plugin. Please see the Creating Rich Internet Applications With Compiled JavaFX Script Technology tutorial (first in a series that I'm writing for java.sun.com) to learn how to obtain the JavaFX Script compiler and begin developing compiled JavaFX Script apps. By the way, the "Compiled JavaFX Script" category of my weblog contains compiled (as opposed to interpreted) JavaFX Script examples.
I haven't kept up with what plug-ins are available for Intellij, but:
1) There is one (that seems dated) JavaFX plugin for Intellij here
2) It wouldn't surprise me to see a compiled JavaFX Script plugin for Intellij.
My preference is a blend of the two approaches that you mentioned. JavaFX Script is meant to be used in such a way that the UI is declaratively expressed, and bound to a model that is articulated in JavaFX classes. I like to use a lightweight model that has the responsibility of interacting with the server as necessary. So the model holds data necessary for the UI in an MVC fashion. That data is often state (such as currently selected element in a ListBox), as well as data from the server (cached in some cases for optimization). Because JavaFX can access Java classes directly, the functions in the model classes have many choices in how they communicate with the server (wrapping Java classes, or using JavaFX JSON/XML libraries, etc.)

The Freebase Browser post has a diagram that represents the architectural pattern that I've been using.
I'm using NetBeans 6.1 (beta) with the compiled JavaFX Script plugin. See the following blog post for details and links:

I hope that all of the RIA technologies do well. I'm very impressed with Flex/AIR, and think that Silverlight has a place (albeit probably less cross-platform). My main reason for choosing JavaFX Script is that it runs on the JVM. I like to quote what Josh Marinacci of Sun said in a Java Posse interview recently:
"JavaFX is sort of a code word for reinventing client Java and fixing the sins of the past"

See the following blog post for a link to the interview:
Hear Juicy Bits about J6u10 and JavaFX in Java Posse Interview
My favorite compiled JavaFX Script tutorial is:
Creating RIAs with JavaFX Script

It's the first article in a series that will appear periodically on java.sun.com

I'll make sure that it gets added to the page mentioned earlier.
All that is required is JRE 1.5, with JRE 1.6 preferred.
Interpreted JavaFX Script, which the book is based upon, is quite stable (it hasn't changed since the book was written, and it also runs in a stable manner). For example, here's an example (Word Search Puzzle Builder) from the book, which includes a JNLP link so that you can run it:
Spotting JavaFX Apps in the Wild - The Word Search Puzzle Builder

Compiled JavaFX Script is still in flux. I only use it for prototyping and creating utilities at this point. Based upon the progress that I've observed in the development of the JavaFX Script Compiler, I anticipate that a 1.0 release will happen in Q3 of 2008, at which point I'll begin writing production applications with compiled JavaFX Script.

My friends call me Jim, by the way :-)

Here are a couple of example JavaFX programs that demonstrate communicating over HTTP (using XML and JSON as the data transport protocols). Note in these examples that JavaFX has libraries that simplify building and parsing XML and JSON documents.

A JavaFX Script Calendar that Displays a Google Calendar Feed

Compiled JavaFX Script Now Speaks JSON

In addition, any client to server communication technology can be used, because you can use Java classes (e.g. that implement RMI, an RPC mechanism, or SOAP)) directly from JavaFX.
I've put as much of the book's content in my JavaFX weblog as the publisher would allow. For example, the following post is straight out of chapter one:
Develop and Run Your First JavaFX Script Program in the Next Few Minutes

This post is as well:
Your Second JavaFX Script Program - The Wonders of Binding to a Model

By the way, the book is based upon interpreted JavaFX Script, and the current version of JavaFX Script is compiled. So in the weblog I've been putting lots of compiled JavaFX Script examples, such as this example which is the compiled JavaFX Script equivalent to the example in the previous link:
Converting Your Second JavaFX Script Program to Compiled Syntax