tags:

views:

810

answers:

2

I'm mostly a C# programmer, I stopped writing Java about 10 years ago, but I try to keep up with the technology in Java by reading articles, talking with friends, etc.

I've heard about the new rich GUI framework called JavaFX, but couldn't find any resource comparing it with non-Java parallels.

Since I'm very familiar with C# and WPF, I'd like to get a feel about how similar or different the two technologies are.

EDIT: Seeing as there's no answers coming, I'll try to be more specific:

  1. WPF uses XAML to create the visual tree, does JavaFX have something similar?
  2. WPF is best used with binding to a view model in an MVVM pattern, does JavaFX also make extensive use of binding?
  3. WPF utilizes the GPU for rendering, does JavaFX do the same?
  4. How does Silverlight compare to JavaFX when run through a browser on a net pc?

... More to come...

I'm changing this to community wiki so that the comparisons can keep getting updated (hopefully).

Thanks!

+5  A: 

I think the best way to to get a feel for JavaFX is to just try it out. There are some good tutorials on the JavaFX website. Here's a couple:

They are pretty quick and give you a good feel for the language. There are many others on the JavaFX site if you are interested in more tutorials and articles.

For specific answers to your questions:

  1. JavaFX has it's own declarative language for creating the "visual tree" which is not an xml derivative. The UI is based on a scene graph so you can apply various effects and animation to any node in the graph. See the tutorials for more information. There is also a designer tool for JavaFX (which I have not yet tried).
  2. JavaFX has binding built into the language.
  3. JavaFX on the desktop uses Java AWT/Swing which does use GPU rendering. Every version of Java seems to offload more of its graphics to the GPU. Chris Campbell from Sun has blogged some about GPU acceleration. I'm not sure if the mobile version of JavaFX has GPU acceleration. I found that earlier versions of JavaFX weren't performant enough for what I needed, but I know the latest version does have significant performance improvements over previous versions and they are still working on making it faster.
  4. JavaFx uses Java Applets to run in the browser. As of Java 6 update 10, the Java applet framework has been reworked and though it is not as seamless as Adobe flash, it is much improved. I'm not sure how it compares to Silverlight other than I've had trouble getting Silverlight to work on Linux, but did get JavaFX working on Linux.

Here's another related question.

Jay Askren
A: 

A very good start and a very good overview gives the

Learn JavaFX in 15 Minutes

tutorial but it seems to be down for some unknown reason -.-

Helper Method