31

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.

H-H
  • 4,431
  • 6
  • 33
  • 41
Yaba
  • 5,979
  • 8
  • 38
  • 44
  • 1
    Interesting question, I am curious to see the answers... I would add Ajax to the mix, even if it isn't in the same league. – PhiLho Nov 10 '08 at 09:37
  • 1
    I was searching today on this.. – Thalaivar Jul 16 '10 at 10:39
  • 2
    AJAX doesn't really belong in this mix, as it's not RIA technology. (Google the meaning of the "AJAX" name and you'll understand why.) – Manius Oct 18 '10 at 02:00
  • 1
    "Closed as not constructive." What a crock. Looking through all the dialog here and it's readily apparent that it's constructive. –  May 07 '16 at 15:06

7 Answers7

21

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.
David Koelle
  • 20,726
  • 23
  • 93
  • 130
  • Can you be more specific as to why binding and time as a data type are paradigm-shifting? – defmeta Nov 10 '08 at 14:15
  • I don't consider Flex as the 'old' technology. It's different. Flash focuses more on drawing and animating primitive objects, while Flex does the same on a higher abstraction level that is more suited for forms and classical UIs. But JavaFX has lots of low level object manipulation functionality. – Yaba Nov 10 '08 at 15:19
  • Oops! I meant >>I don't consider FLASH as the 'old' technology.< – Yaba Nov 10 '08 at 15:20
  • Sorry, I wrote this too early in the morning after a late night, and it wasn't as well-written as it could have been. I've edited my post. – David Koelle Nov 10 '08 at 15:49
  • 1
    @Yaba: I would agree that Flash isn't "old". That didn't come out right! – David Koelle Nov 10 '08 at 15:50
  • @David: Thank you... sounds much more reasonable now. – Yaba Nov 10 '08 at 16:26
  • I really like the **idea** of JavaFX and would **love** to switch to it from Flex, but they still have a long way to go in a lot of areas before I'd consider it mature enough. Right now Flex and Silverlight (maybe) are the only real mature RIA options out there. In the future it'll be great when that changes. Removing the (admittedly tiny) ActionScript language barrier for Java devs to jump to real RIA development and get away from this JavaScript hacking stuff people are stuck on will be huge. – Manius Oct 18 '10 at 02:05
  • JavaFX 2.0 made it much better for Linux world. Where Adobe Air and others stoping for further development for Linux. Which is ovious that JavaFX 2.0 is needed, and its an must to have for Web challenges. –  Jan 28 '12 at 21:59
6

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.

Akash Kava
  • 39,066
  • 20
  • 121
  • 167
  • "... flex is pure xml" - I have doubts about this. Flex is actually sdk which uses XML documents (MXML) and ActionScript as programming language. – tefozi Nov 09 '09 at 07:54
  • 1
    Hm... I disagree here. MXML will be translated to AS, which can cause problems. And then you have to decide whether to implement components in MXML or AS (the later is more powerful). JFX is more like JSON, but has at least a consistent syntax. – Yaba Nov 16 '09 at 09:13
  • MXML is basically shorthand for AS code, which is a good thing when you consider how much you'd have to type to do the same thing procedurally (look at your typical Java Swing app to see the difference - massive, long, repetitive lines of properties getting set - yuck). – Manius Oct 18 '10 at 02:13
  • 2012, JavaFX 2.0 is changed. And yes it matters to have Web Java for low-level and high-demand to achieve. Flex/Flash is a blocker for Linux users where JavaFX not. –  Jan 28 '12 at 21:54
3

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

Yaba
  • 5,979
  • 8
  • 38
  • 44
  • "The availability of the JavaFX runtime is basically that of the Java platform ... (I believe it will require the latest updated 10 release)" I just wanted to say he is wrong about this point, I am on Mac Os 10.4 with Java 5, and Java Fx works for me. – James McMahon Jan 06 '09 at 09:52
3

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..

madmax
  • 31
  • 1
1

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.

Iain
  • 9,432
  • 11
  • 47
  • 64
1

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.

Ross Henderson
  • 1,779
  • 16
  • 23
1

Listen to the interview with Adobe's James Ward.

Interview with Adobe's James Ward

Muhogo
  • 11
  • 1