Casper Bang wrote:
> A colleague of mine mentioned the idea of using JavaFX to develop
> websites (specifically JSF) and how it could be an interesting way to
> expand and consolidate the use cases, perhaps avoid having to deal
> with the current 3 layers (XML/JSP, EL and Java). Is this scenario
> feasible? Could one imagine using JavaFX to both design components as
> well as wiring them up in a web-application scenario?

But the whole point of JavaFX is so that you don't have to develop a 
"website."

Right now there is nothing in the JavaFX SDK that enables people to 
develop websites.  However you can:

   + write applets that are embedded in webpages

   + do DOM scripting using JavaFX Script through LiveConnect

The JavaFX Script language is GPLed and anyone can pick it up and hook 
it to any runtime they please.  So something like the GWT but with 
JavaFX Script as the programming language is not impossible.  But Why?

> Also, data binding is obviously a first class concept in JavaFX, but
> what about querying? Would it be possible to mimic LINQ and
> dynamically build query AST's that a provider layer could then
> translate into i.e. SQL?

JavaFX Script does provide query capabilities through its expression 
language.  And JavaFX Script expressions are heavily used with the bind 
operator to effect some of the most elegant dynamic GUIs.  See

   http://blogs.sun.com/chrisoliver/entry/simple_yet_elegant_vector_user

for an example.

The bind-to-expressions capability is available for JavaFX Script 
objects only.  And I'm afraid that the "that a provider layer could then 
translate into i.e. SQL" part is not there.  Within those ten little 
words lie a quagmire.

> Just wondering whether perhaps there's more to JavaFX than meets the
> eye :)

"Meets the eye" is what JavaFX is all about.  The JavaFX Script language 
is designed with RIA in mind (RIA is defined as anything that JavaFX 
Script can do now :)    ):

   + Its single threadedness is meant to match the single threadedness 
of all the GUI toolkits out there

   + Its flat sequence data model is very similar to the data model in 
XSLT/XQuery/XPath, which works well with hierarchical data models (of 
which the GUI with its containment hierarchy is a perfect example)

   + Its data-binding and anonymous function (closures) facilities 
offers the "properties" and "events" support that's very helpful in GUI 
development

   + Its static type system + type inference facilities allows people to 
write "dynamic language like" (JavaScript like) code that can be 
compiled to Java class files, providing Java/Scala like performance. 
This design choice is driven by the need for speed in GUI animations and 
transitions.

If there is another domain that exhibits characteristics similar to what 
the language will support, then yes, JavaFX Script may turn out to help 
a lot.

These are observations from outside of Sun.  The Sun folks on the list 
may provide insights from the inside.

-- 
Weiqi Gao
[email protected]
http://www.weiqigao.com/blog/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to