Question

I know Flex pretty good but also started to use Java FX. I am a little bit confused. Java FX seems to focus more on low level drawing operations and animations. Less on creating standard UIs like Flex.

So is JavaFX more like Flash than Flex?

On the other side JavaFX also supports Swing components as well as data binding, which makes it appear more like Flex.

Was it helpful?

Solution

I think JavaFX is more like Flex, because JavaFX is more about building applications than animations (which is, I gather, one of the sensitive distinctions between Flex and Flash).

I think of JavaFX and Flex as the future heirs to Rich Internet Application programming. They're both intended to stretch the realm of what's possible with RIA.

One of the biggest benefits of JavaFX that I see is that you can use your existing Java business logic by simply importing it.

Some of the language features, such as binding and duration as a data type, are paradigm-shifting, because they make certain functionality possible and readily available:

  • Binding: Connecting two values together, so you can automatically update one value when the other updates. Example: "name: bind textfield.getValue". Much easier than setting up Observer patterns to watch for changes to variables.
  • Duration can be used as a data type: "var frameDelay = 5ms". Having Duration as an integral part of the language seems like a no-brainer when dealing with animations.

OTHER TIPS

I would like to add few points,

  1. Flex is far more stable then JavaFX, JavaFX is fairly new.

  2. JavaFX syntax is really bad, its unnecessarily complex, where else flex is pure xml, one can read and understand easily, I didnt understand what made java guys think that instead of using xml (like silverlight and flex), making new language syntax will shock the world? New syntax means new learning curve.

  3. Flex runs on flash, 95% installations world wide, only 1.2MB of Flash download compared to JavaFX + Java runtime of minimum 30 mb, this is too big consideration for publisher.

Just saw this posting by Chet Haase, who previously worked on Java FX at Sun, but now works for Adobe on Flex.

Recently I used both Adobe Flex 4 and Java Fx 1.3.1, I agree both are very powerful Rich internet graphic application development tools.

My take on Adobe Flex 4 is, it is very easy design tool. It take care of lot of programming part by automatically generating the code. So my vote is "Easy Tool". If you make any change to data source , change a label identifier etc, it generates code and corrects any reference inside the code.

Java Fx 1.3.1 is little more difficult as compared to Adobe Flex, but there is no comparison the look and feel, "Graphical Effects" and this best in terms of Java compatibility.

Adobe Flex 4 builder is not free Java Fx 1.3.1 + NetBeans is free. This makes a lot of difference in freelance developer community.

Again this comparison not applicable for "Desktop application" vs "mobile application" vs "web application"

There are further limitations for both in terms of Printing, download application to excel or csv, etc..

I'd say it's more like Flash - or at least it's about bringing Flash-like abilities to Java. Don't forget that Flex is built on top of Flash. JavaFX script from what I've seen is quite similar to ActionScript, and not at all like MXML. Sun seem to be stressing the importance of things like video and the ability to work with vector graphics from industry standard design programs.

I think beauty of Flash is the ability to create your own, nice-looking UI components, whereas Flex is about laying out standard components using tags. So again, it's more like Flash.

I'm a Flex developer with background in Flash - no Java experience. So, I'd normally skip this thread, but I happened to run across this post, just now:

http://www.insideria.com/2008/11/is-client-side-java-losing-gro.html

It contains a short discussion on Java and Flex, but what is most appropriate to your question, Yaba, is the link to a series of articles a group called Sharendipitous is posting about their conversion from Java to Flex - why they made the decision, how they did it, etc.

Listen to the interview with Adobe's James Ward.

Interview with Adobe's James Ward

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top