Both languages are designed for UI declaration.

MXML is XML based representation of UI tree. Each XML tags represent UI components implemented in AS3 and you have many possibilities to embed AS3 code in MXML. Under the hoods the compiler will generate a number of AS files from one MXML file and compile them to a Flash Application (SWF file).

JavaFx is a complete new script language with AS3 like syntax. The representation of  UI tree is JSON like, so it’s not as verbose as XML. I am not familiar with the internal processing of “fx” scripts but after compilation you get a few “.class” files that represent the elements you declared in the script.

JavaFx is just a script language for JVM, like for example Groovy, that has some special tools for UI creation.

In my opinion those are the key benefits compared to ActionScript 3:
- Function signatures are strong typed

function(:Number):Boolean

- Static is banned in favor of Script Variable / Function
- Ranges are provided

for (x in [1..5]) {
   [x, x*x]
}

- first citizen value changed observer

var x = 0 on replace { println("x is now: {x}") }

- first citizen value binding

var y = 3;
function ten() : Integer {
   println("Called ten");
   10
}
def sum = bind ten() + y;
println(sum);
y = 7;
println(sum);

-immutable objects and elements
-Bidirectional Binding

If you are interested in details have a look at this URL:
http://openjfx.java.sun.com/current-build/doc/reference/JavaFXReference.html

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Before you submit form:
Human test by Not Captcha

© 2011 Max Blog Suffusion theme by Sayontan Sinha