tags:

views:

574

answers:

5
+1  Q: 

AIR (Flex) vs Java

I am writing a desktop application and trying to decide between using AIR (FLex) or Java. Some of the requirements for the application are:

  • needing to securely connect to web services and JMS
  • have a very interactive UI (lots of little and big features)
  • displaying video
  • Communicate with a C++ application

To implement the web services and JMS for Flex we were thinking of using Merapi to communicate with a Java application. Does this mean we should probably go with Java or does the better graphics capabilities of Flex still make it a better choice?

Which language would you choose?

A: 

Personally, I like the way UI is designed in Flex. I'm not sure if Java has something that is equivalent.

I know that Flex/Air can connect to normal web services (and I believe you can wrap something for JMS support as it works over HTTP?).

Not sure about video compatibility though, if that is an issue for you.

I assume performance is not a primary issue.

CookieOfFortune
you got GWT for good UI in Java :)
bLee
@bLee sorry I did not specify, but I thought it was apparent that this application is for the desktop not an internet browser. I thought GWT was for browser applications?
asawilliams
... regardless, UI creation in GWT is not based upon a XML description , the way Flex and WPF are.
CookieOfFortune
+1  A: 

I think both technologies handle most of your requirements well, but in my opinion, Flash/Flex is the easiest way to deal with video. AIR applications are a little annoying in that they're AIR applications and you can't just install them without the AIR runtime. That said, AIR provides a lot of nice features like installation, auto-updating, etc.

I'm not sure how easy it will be to use JMS with Flex, although if there aren't already AS3 libraries to handle it, I don't think it would be too hard to write one. That would be my biggest concern in using Flex. Otherwise, it does UI and video well.

thehiatus
the same can be said for java, in that you need to install the JRE
asawilliams
+2  A: 

I'm a partial fan of AIR having done a rather large "flashy" UI on-top of a bunch of XML based REST services. Flex has numerous issues, but it has come a long way. It's performance as of 1.5.x is good and it's garbage collector is finally getting better to.

AIR Points:

  • Good but not great documentation
  • Fair amount of libraries
  • Great video support
  • Great for snazzy layouts
  • Good but weird CSS support
  • Good community
  • Growing base framework (Adobe is actually pushing it)
  • AIR framework doesn't have to be installed by Adobe's installer
  • Pseudo one-click browser based "Badge" installer

Java Points:

  • Good but not great documentation
  • Tons of libraries
  • Decent video support
  • Okay for layouts (very old-school - even SWT)
  • Solid community
  • Framework is relatively stagnant (I don't personally feel Java being pushed. Once corporations latched on Sun stopped growing the language until .NET and other dynamic languages started going after their market-space.)
  • Java applications almost always require specific JRE versions
  • Java, much like AIR, requires the JRE but you can't install it yourself (silently).

When you get to choose like this there is never the "right" answer, only the one that makes sense to you and your team. Everyone's got differing opinions and all languages have drawbacks. And no matter what you pick, there will always be a point (if not many) when you double guess yourself.

Good luck!

mimetnet
+1  A: 

If you're going to use Merapi to communicate with Java, you have to remember the limitations of AIR. AIR can't start any system processes on its own, so if you want to communicate via Merapi to Java, you need to have the Java process started before your AIR application is started. There isn't really another way around this, yet.

AIR 2.0 will be able to launch processes, but until it's released, we're stuck waiting around.

TK Kocheran
Air 2 is in public Beta now and should be released in H1 2010
Stu Thompson
+2  A: 

I'll try to address each of your points below:

needing to securely connect to web services and JMS

Flex/AIR supports SOAP although it does not support most (any?) of the WS-standards, such as WS-Security. Flex/AIR cannot directly communicate with JMS however you can add the Blaze DS Java component to the backend, which can adapt a JMS endpoint for use with Flex/AIR's Consumer/Producer messaging architecture.

have a very interactive UI (lots of little and big features)

I think overall Flex/AIR wins here. Not that you can't do cool UI's in Java / JavaFX but Flex/AIR will let you build a cool UI with significantly less code / effort.

displaying video

I haven't worked with video much in Java but it's easy to do video in any Flash environment. You probably want to consider which formats you need to support to help steer your decision.

Communicate with a C++ application

AIR 2.0 will allow for direct communication with native processes, so depending on your timeline you might be able to use native AIR functionality instead of Merapi. Java obviously has this capability already.

cliff.meyers