• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaFX vs Flex

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stephen and Dean,

Could you provide your insights as to JavaFX vs Adobe's Flex? It seems like both aim to create slick UIs more quickly than Swing. What advantages does JavaFX offer? I think Flex is primarily aimed toward web apps but I think it can also be used for desktop apps. Should they be seen as competitors or are there ways for them to work together?

thanks,
Jeff
 
author
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you can certainly view JavaFX and Flex as competitors (which probably explains the presence of James Ward in this forum ).

I haven't used Flex as much as JavaFX, but here are my general impressions:

Flex is more mature having been on the market longer. In my opinion, Flex has a better deployment story particularly for applications running in the browser. I give the edge in tooling to Flex Builder over the NetBeans JavaFX plugin. And if you need to play Flash video and know that it will just work, then Flex is your best bet at the moment.

On the other hand, JavaFX takes full advantage of the power of the JVM (multi-threading in a Flex app is not well supported, for example). I also think that JavaFX solves some problems in a more elegant way than Flex. The ability to bind to an arbitrary expression in JavaFX is very powerful. Further, JavaFX's declarative syntax is, in my opinion, far superior to having to use XML to declare your UI as in Flex.

To summarize, Flex is a nice mature toolkit but it is evolutionary whereas JavaFX is more revolutionary. Hopefully the cliche police aren't lurking here.

Dean
 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your insights. Would you say that JavaFX is more geared toward web applications or do you also think it is well suited for slick desktop apps (maybe I'm in the minority here of people creating desktop apps with Java, or desktop apps in general)? It seems like Flex is aimed towards RIAs although I know it can be used for desktop apps.


Further, JavaFX's declarative syntax is, in my opinion, far superior to having to use XML to declare your UI as in Flex.


I agree with the declarative syntax - but does JavaFX offer much in that aspect over Groovy's Swing Builder?

I've always done desktop apps in Swing - trying to find out if it's getting to be that time to move on...

thanks,
Jeff
 
Dean Iverson
author
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think JavaFX, like Flex, is ideally suited to creating RIAs that run in the browser and on the desktop. I'm primarily a desktop developer myself and have used JavaFX in several small and medium sized apps for the desktop (primarily web service clients and the like).

I'm a fan of Groovy, but to me JavaFX's syntax is cleaner than SwingBuilder. In addition, the binding support in JavaFX is more powerful and for a project of any significant size I prefer a statically typed language for the extra compile-time checks and the better tool support.
 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think JavaFX, like Flex, is ideally suited to creating RIAs that run in the browser and on the desktop.

While I haven't used WPF/Silverlight, I've heard that it's not truly cross browser/desktop (meaning it may require some different code in places to run on the desktop or browser). In your experiences with JavaFX (or Flex), can the same code truly run in both the browser and as a desktop app?

thanks,
Jeff

PS - I appreciate your time here at the forum this week.
 
Dean Iverson
author
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can absolutely run the same code on the browser and in the desktop. There are some special cases you may want to handle for a browser environment, but that is easily done by detecting the environment at runtime and using the Stage and related classes such as AppletStageExtension.

Extending a desktop/browser app to mobile is a little trickier. You have to be careful to use only the common profile, which can be slightly limiting sometimes. And you run into other odds and ends that aren't supported on mobile such as string formatting directives.
 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great, thanks so much. Sounds like I've got some new topics to learn about (and maybe I'll win a book too!).

Jeff
reply
    Bookmark Topic Watch Topic
  • New Topic