Alex Rivera | Logout

Why should I use Flex?

Asked 2008-09-24T15:58:23.057
14

In a recent conversation, I mentioned that I was using JavaScript for a web application. That comment prompted a response: "You should use Flex instead. It will cut your development time down and JavaScript is too hard to debug and maintain. You need to use the right tool for the right job." Now, I don't know too much about Flex, but I personally don't feel like JavaScript is too hard to debug or maintain, especially if you use a framework. JavaScript is also one of the most used languages right now, so it would seem a better choice in that regard too. However, his reply piqued my interest. Would Flex be a good choice for a distributable web app for which 3rd party developers could build add-ons? What are the advantages of using it vs. a JavaScript framework? What are some of the disadvantages?

Edit
Report

2 Answers

12

I would push you towards standard web development technologies in most cases. Javascript is no longer a great challenge to debug or maintain with good libs like jQuery/Prototype to iron out some of the browser inconsistencies and tools like Firebug and the MS script debugger to help with debugging.

There are cases when Flash is a better option, but only in cases where you are doing complex animations. And, if you are willing to invest the effort, most animations can be achieved without resorting to flash. A couple of examples...

Flash content is not as accessible as other content.
This will not only affect people with out flash, but also search engine spiders. There may be some hacks to help get around this now, but I think that most flash content will never be indexed by google.

Flash breaks the web UI.
For example:

  • If I click my mouse wheel on a link, that link is opened in a background tab. In a flash app there is no way to simulate this behavior.
  • If I select text in my browser and right-click I get options provided by the browser that include things like "Search Google for this text". In a flash app those options are no longer there.
  • If I right click on a link or an image I get a different set of options that are not available in a flash app. This can be very frustrating to a user who is not "flash savvy".
answered 2008-09-24T17:05:44.487
1

GWT lets you do the same stuff as Flex for the most part, and handles all the browser compatibility issues, AND lets you code/debug in Java with your favorite IDE.

All without having to learn a new language (or pay Adobe $$$ for the flex IDE you'll need to do anything real).

Flex has some prettier UI widgets than GWT has out of the box, but there's a ton of 3rd party widgets (such as GWT-EXT-JS) you can use - or, you can use your existing favorite JS widgets with GWT.

Check it out if you haven't: http://code.google.com/webtoolkit/

answered 2008-09-24T16:09:36.137

Your Answer