tags:

views:

7225

answers:

12
+18  Q: 

GWT vs Flex vs ?

+10  A: 

I'm not familiar with GWT, but I'm very familiar with Flex. Even though GWT is Java-based (and it sounds like you're largely a Java shop), I'd recommend Flex based on your listed interests:

  • Futureproof - Flash powers YouTube and a huge percentage of multimedia on the web... they've built it into video game consoles and Intel is building it into settop boxes. It's going to be here for a long, long time, and Adobe has always maintained 100% backwards compatibility with their Flash players.

  • Works on all major browsers - yes. And with Flash Player 10, that includes Linux systems as well. And with very minimal admin headaches (way less than Java, in my opinion).

  • Fast & responsive user experience - yes, though Java can be faster in some scenarios. Flash is optimized for vector rendering, so since that's your target, it may be give you better performance than Java.

  • Code should be unit testable - yes, see FlexUnit.

  • Code must be maintainable - definitely. AS3 is a serious language, not a toy scripting language. It will be very familiar to users of C# or Java.

  • Speed & ease of development - for what you're doing, you'll be able to find dozens of examples of exactly what you described: zooming and panning Google Maps -like vector images. The core of the runtime is a well-designed graphics engine, so building an interactive graphics app is its natural chore.

  • Supports vector graphics of some sort (SVG a plus) - obviously, Flash does this natively. SVG is supported at the compilation stage (you can compile in SVG but you can't parse SVG at run-time). There are toolchains available that'll convert SVG to SWF for you at runtime.

The only reason I'd see for using GWT would be to keep your shop Java on server and client... but then again, you're looking for the best tech for the job, right? In that case, I'd say Flash (and in particular, the Flex framework) is best suited for what you're wanting to accomplish.

Troy Gilbert
I don't know that Flex or any other RIA technology can truly be futureproof. The only way to save yourself is to make your UI as lightweight as you can so that the cost to change to a new technology when the next great whiz-bang feature comes along is very low.
Scott W
Petteri Hietavirta
Just wanted to pick up from your second point. GWT does not require Java installed on the client. The whole idea of GWT is that JavaScript is the output so that it can work in pretty much any browser without requiring plugins so no "admin headache".
Daniel Vaughan
Scott, Flex or any other player/VM-based RIA tech may not be infinitely futureproof (what is?) but it's inescapably *more* futureproof, being shielded from 99% of the issues you can experience with non-standard browser environments.
Crusader
+2  A: 

I'm biased toward Flex since I've been doing Flash/Flex development since 2000. I think to answer your question though, it really comes down to the level of interactivity and complexity you want to achieve.

Flex is going to let you do things that would be nearly impossible in a JavaScript environment (ASP.NET AJAX, jQuery, GWT) such as simple 3d graphics. Building complex interactivity is really trivial in Flex. Also it is very fast and can handle lots of animated objects at a time. Flex can communicate seamlessly to .NET or Java using web services. The downside of using Flex is that it feels like an embedded application on your web site rather than something that is tightly integrated.

If you are going to stick with a JavaScript approach, usually I'd suggest using something language agnostic like jQuery. But since you already have GWT experience, that may work well for your project. The downside is that GWT in the end is still JavaScript, so you are going to be limited by the speed and interactivity of what is possible in a browser.

DavGarcia
There IS 3d graphics support in GWT via http://code.google.com/p/gwt-o3d/
kirushik
+2  A: 

Sun has recently launched a new technology called JavaFX for these kinds of RIAs. You may want to check it out (javafx.com). It is suppose to run on Java 5 or better but that will definitely not have the kind of client penetration that Flash does. I think however given your requirements for testing that this technology may not be appropriate at this time.

Also, I think Troy Gilbert made an error in his post. Specifically, he seems to indicate that a GWT application will run (by the client) in java. I'm almost certain that a GWT application is written first in Java and then GWT will compile that into a javascript library that the client runs.

Hayden Jones
Your understanding of GWT is correct.
cletus
That is correct, and this of course means that GWT suffers from most of the same issues of any run-of-the-mill so-called "AJAX framework"--browser 'platform' dependency and exposure to a very dynamic, non-standard development environment. A Flex application runs in a Flash virtual machine which shields you from 99% of the problems associated with running on half a dozen different browsers.
Crusader
+18  A: 

I'm only mildly familiar with Flex, but have worked with GWT for many years. We had to make a very similar decision some years ago (Flash vs GWT), but for different reasons. In the end we saw the many advantages of GWT over Flash (Many of which apply to Flex):

  • Not all our customers have flash, penetration numbers from Adobe are useless, you need your own (which we have) to see what your customers actually have. In corporate and education markets the penetration is actually far lower than the high 90s that Adobe quotes.

  • GWT is truly cross-browser and platform compatible (Linux, Mac, Windows, Android, iPhone, etc, etc) whereas flash will never be. You may not care about that, but we did.

  • Flex is proprietry Adobe Technology, whereas GWT is fully open source and customisable

  • GWT integrates with the DOM, and everything else on your page far easier than flash and Flex do.

  • GWT is coded in Java, and we all know Java extremely well

To Address your specific points:

*  futureproof

Nothing is truly future proof, but I feel that both GWT and Flex would be fairly future proof. Maybe GWT a tiny bit more so because it's open source.

* works on all major browsers

GWT works in Firefox(and all gecko browser), Safari (and all Webkit browsers), IE and Opera. Flex works in all browsers, but only if Flash is supported, so I would say GWT comes out on top there.

* fast & responsive user experience

On platforms where it's supported, Flex is going to kill GWT dead for user experience. You just can't compete with flash when it comes to smoothness and slickness.

* code should be unit testable

Both are easily unit testable

* code must be maintainable

When coded well both are maintainable

* speed & ease of development

As long as your familiar with them, I'd say it's much of a muchness.

* supports vector graphics of some sort (SVG a plus)

I can't speak for Flex, but GWT supports vector graphics via SVG, through third-party libraries.

rustyshelf
Flex is open source, see http://labs.adobe.com/wiki/index.php/Flex:Open_SourceFlex supports compile-time SVG: http://www.adobe.com/devnet/flex/quickstart/embedding_assets/#EmbeddingSvgFiles
Troy Gilbert
Flex supports vector graphics. Either the new open source FXG format (http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification), SVG or SWF.
rlovtang
"Works on all major browsers" - 'today' that's not an issue for GWT, but if IEx (or any browser really) comes out, creates an issue which requires an update in GWT to fix--now your app is **broken** until you go through the possibly painful process of upgrading GWT. Ouch! GWT isn't quite as futureproof! The comment starting "GWT is truly cross-browser and platform compatible" implying that Flex/Flash isn't does not come off completely honest. The only real compatibility issue is with crippled iProducts. But it's everyone's choice on whether to support Apple's anti-choice practices or not...
Crusader
yeah damn those iProducts and there 100,000,000 user install base. You should just ignore them. That would be the right thing to do ;)Safari is a major browser. ANY browsers with 100 million users is a major browser. It's not Adobe's fault that Apple are being jerks about it, but that's the way it is ;)
rustyshelf
+4  A: 

One other point to note is that neither the iPhone nor Android currently support Flash. A lot more people are expecting to access web apps on their phones.

Outdated regarding Android. For iPhone, it's a matter of pressure on Jobs to stop intentionally crippling his products. Eventually customers are going to get tired of running into "not supported on iPhone" and they'll have to allow Flash."Apple's iPhone doesn't run Flash, though Adobe would like to see it there and has been developing a version. "We are developing Flash player for the iPhone. To release software on the iPhone requires Apple's agreement. We have to make it work great, and need to get their agreement to have it released," said Adobe chief technology officer Kevin Lynch"
Crusader
A: 

While iPhone and Android do not support flash YET, you should also note that Google create applications targeted for the mobile phone. They are doing that because the screen on mobile devices is vastly smaller then the typical laptop/desktop. Therefore, the lack of flash support is a non-issue, since a targeted app provides a better user experience.

A: 

My company was faced with the same decision about one year ago. Have you heard of GXT http://extjs.com/products/gxt/? We ultimately chose GXT. As a .NET developer, making the transition from .NET to GXT was great. We developed an corporate-wide management program with GXT/GWT. The downsides are that GXT is developed by a much smaller team compared to Flex and the community isn't near as large. However, it delivers an impressive in-browser experience. Check it out.

JP
A: 

I know you asked about GWT vs Flex, but if you have a say over the final decision you should seriously consider whether to move away from AJAX and ASP.NET. Despite what Adobe, Microsoft, and Sun say, RIAs (Rich Internet Applications) are not yet ready for a primetime browser experience except in limited form (like video players).

A full-blown application written for the browser, in native browser technology, is going to give the best possible experience to the user as well as having the most development resources available to maintain it.

ASP.NET is not going anywhere. Neither is Java or Flex. But for sheer reach, best possible user experience overall, and maintainability (due to there just being far more available programming resources available) you cannot beat a native browser-based application.

ASP.NET MVC is purely web-based and very Ajaxy. You might check it out. It is similar to Ruby on Rails (without the Rails) and developers (even devs new to ASP.NET) are quite taken with it.

CLaRGe
"Not ready for primetime"? That'll be interesting news to all the people using production Flex and Silverlight applications in the corporate world. "Native browser technology" cannot support "full-blown applications", all they do is run scripts which mock the behavior of an application--and they can **never** do it consistently or reliably. All the technology you're pushing fits the definition of a legacy system perfectly. http://en.wikipedia.org/wiki/Legacy_system
Crusader
+3  A: 

I was part of a project that used GWT, and I loved it, especially since Java is my primary programming language of choice. I haven't used Flex, so I'm only giving you info on what I've experienced with GWT. To comment on some your requirements

*futureproof - GWT's been there for a couple of years already, and its continually supported by Google.

*works on all major browsers - if you've used GWT, cross-browser programming has never been much easier. GWT does this for you!

*code should be unit testable - yes you can unit test GWT, its also easy to debug GWT.

*speed & ease of development - Ajax is made a lot less complicated thanks to GWT. That alone could speed up your RIA development.

Aside from these, I just have to say, I love their Google Group! It's very active and you could find a lot of people out there that could help you out in case you get stuck with something.

mives
"Works on all major browsers" - today that's not an issue, but if IEx (or any browser really) comes out, creates an issue which requires an update in GWT to fix--now your app is broken until you go through the possibly painful process of upgrading GWT. Ouch! GWT isn't quite as futureproof.
Crusader
+2  A: 

I've used both teçhnologies for some time.

Futureproof - both of them will be succesful i guess, but every technology will be prefered in different situations. For example flex in large (mostly intranet) enterprises with desired desktop like ui (Flex can be used on the top of the any server platform(jvm,.Net,php,ruby,coldfusion)). GWT otherwise will be dominant in small to medium app with traditional jvm backend (tomcat+spring etc.)

Works on all major browsers - both are non-problematic in this way. Flex absolutly excellent, when flash plugin is installed there is not need to solve any cross-browser compatibility (of course... browser are passive, when flash app runs:). I remember we had some minor problems with GWT and tradional troublemaker IE6, but nothing horrible...

Fast & responsive user experience - both are the top in their category. Flex i think absolutly the top of the all RIA solutions(maybe silverlight, java fx can be only competitors in richnest), expecially integrated with LCDS with cool features like data management, real server side data push etc. GWT is the one of the top in ajax framework category. The more richest and complicated ui you need, the more reasons to using flex you have. Intepreted javascript in any case can't be faster&responsive then compiled actionscript/swf.

Code should be unit testable - yes, they are greatly testable.

Code must be maintainable - both excellent, maintaining actionscript is comparable to java(gwt), if you use a good IDE for example Flex Builder.

Speed & ease of development - both perfect if you know your staff. Everything depends of your backround. For typical java developer learning curve to flex will be probably a little bit more difficult(You need to learn a new compliler/runtime and probably new IDE or at least new eclipse IDE plugin:). Some knowledge of flash is a +, but not required and only usually with specific tasks like building your own components etc.

Supports vector graphics of some sort (SVG a plus) - no issues I remember, i have no too much experience with this, but i will look at it in future when FXG will be finnalized.

development & deployment costs - The winner is clear here. GWT. Flex was developed to make a profit. Although self is opensourced, best tools(Flex Builder, new Flash Builder/Catalyst) & frameworks(LCDS) are commerciall and not cheap at all. Look at LCDS per CPU pricelist and you will know what i'm talking about. With GWT most of the quality tools/frameworks are opensourced or free at least. Except some advanced components like ext gwt and smartgwt EE. Obviously u can live without them.

Janci
Crusader
A: 

This really is an apples / oranges question. With GWT, you get the pureness of writing everything in Java. Ironically, the end result will never feel like anything other than a website.

With Flex, you get to write something that feels like an application. And, perhaps most importantly, with Flex, there is NOTHING you cannot do programatically - whether functional or graphical.

If you are developing applications for a specific user base, Flex is a winner by miles. If you are building a mass social web based whatever, GWT is definitely a better choice.

Neil Visnapuu
@Nail Visnapuu: GMail doesn't feel like anything other than a website? We're probably not visiting the same websites ;)
Webinator
Actually it doesn't. Just some fancy AJAX scripts and a bunch of JS that makes it run a bit slow (which is actually the performance you'd expect of a website). This answer has a lot of truth in it. Gmail IMO isn't as impressive as JavaScript advocates always like to brag it is. 99% of the time you're just there to view some mail, maybe reply to one or two, and leave. Nothing a basic "non-AJAXy" website couldn't handle perfectly well.
Crusader
A: 

I liked the comment from kirushik claiming that "GWT has 3d support". Not so fast, let's be completely honest here. You need a special plugin to do this: "Requires Google O3D plugin download" OOps!

Sorry this couldn't be a direct comment/response but I felt this was an important point that shouldn't be simply ignored, especially when so many JavaScript fanboys are out there howling about not wanting to use "evil" plugins... (The real reason they cry about this non-issue, particularly when corporations have total control over the simple task of deploying Flash on their private networks or not, is that they think it's an easy hit against Flex or Silverlight to help them promote their own skill sets.)

Crusader