1

I have some experience of developing in Flex/Actionscript using Cairngorm framework. At that time I had no prior experience of ActionScript/Flex and it took me some good 3 months to get started with seriously developing an application. That time too, I was skeptical developing an app based in Flash, which won't be viewable on all the PC browsers(not without updating flash), leave alone iphone/ipad. But I want to see what kind to application can be built using Flex, so took the challenge.

But now I am again starting to wonder why should I muddle into Flex, when I have jquery/ajax, various fast php frameworks(which I am comfortable with unlike ActionScript/Flex).

How, if I decide to, should I convince my clients that website in Flex can be much better than ones built in HTML/php etc.

Can somebody throw some light on this?

Regards

vikmalhotra
  • 9,981
  • 20
  • 97
  • 137
  • 1
    Change the word agile in the title to HTML/AJAX. – Amarghosh Jul 28 '10 at 07:16
  • Check this thread: http://stackoverflow.com/questions/424895/gwt-vs-flex-vs Read GWT as AJAX – Amarghosh Jul 28 '10 at 07:41
  • Some advice regarding 'frameworks' -- don't worry about them unless you have a very solid need, which probably means you're making a massive/modular application with a large team. I've found that in most cases most Flex (or even Java) 'frameworks' just add more code and boilerplate (*especially* Cairngorm). A possible exception is Swiz, to a point, especially if you pick and choose the parts of Swiz you'd like to use. – Manius Sep 05 '11 at 00:09
  • Also, note that nobody needs to 'update' Flash, Flex will work fine on any version from about 9 or later. Deployment rates are very high (also consider that sometimes JavaScript or CSS doesn't work correctly in every browser--so the effective 'deployment' rate of jquery/ajax should not be considered 100% automatically either). Finally - in the corporate intranet world where Flex is booming - IT controls what gets installed, so Flash deployment is 100% at the click of a button. – Manius Sep 05 '11 at 00:15

6 Answers6

4

There are more reasons than just these, but some major ones are:

O&M costs: Most "engineers" don't give a rats A about this because they are development-centric, but the fact is that O&M is by far the leading cost of running IT systems. With a VM approach like Flex (or Silverlight, or JavaFX) you don't have to worry about updating libraries, testing, applying fixes, and so on every time a new browser comes out. Using legacy technologies which are harder to keep running day-to-day directly hurts your clients' bottom line.

Performance: Flash (Flex) is JIT compiled, (wouldn't be surprised if SL is too), and Java is as well. Interpreted JavaScript dependent libraries such as GWT simply cannot hold a candle to the performance you get out of a compiled VM client--it's not even a close comparison. "AJAX" (esp when using XML) is not "fast". (Just look pay attention to how slow Gmail typically loads--a very simple AJAX-enabled script.) The proof is in the benchmarks.

Consistency/Reliability: Everyone knows that when you write anything using JavaScript or HTML, it has to be tested in every browser (including some older versions if you really want to be safe). No such problem when you're targeting a VM platform. With AJAX: worry whenever a new browser or version of a browser is released. If there's problems, it'll create work for you.

Richer components and a better user experience: This is one of Adobe's big selling points, but it's true. While some of the stuff that has been done purely with browser scripting (JavaScript) is impressive, Flex or Silverlight components are just better. It's also easy to create your own custom components when you don't need to write (and maintain!) cross-browser JavaScript magic.

Flex specific, but worthy of mention--AMF: This is the Flex Data Services binary protocol which can be used to talk to servers. Benchmarks (ask Google) have demonstrated this protocol to be much faster and more bandwidth efficient than protocols used by AJAX frameworks. In today's world where networks are becoming the major bottleneck (if not clearly already), this is quite a big win.

It's a sensitive topic for many. Most AJAX/DHTML/JavaScript 'engineers' or whatever they call themselves will howl and throw feces at the mere suggestion that this 1990's technology they have spent years becoming an expert in is outdated and flawed (quite frankly they have a lot to lose). But based on pure technical merit, even HTML5 is a counter productive waste of time compared to any mature VM based solution. I'm sure some will show up shortly to defend their cult of denial by voting this down. But it's hard holding back the future.

AJAX/DHTML frameworks all rely essentially on legacy hacks and complex, slow, fragile, constantly maintained libraries to keep them running reasonably well in multiple browsers. HTML5, when it's finally "complete" in 2022 (!!!) won't even be caught up to Silverlight 2 in terms of features--never mind the huge amount of stuff Flex will have out there by then. Basically the AJAX stuff is a maintenance quagmire and a fragile development environment that you can completely avoid by using a VM solution like Flex, Silverlight, or JavaFX.

Manius
  • 3,594
  • 3
  • 34
  • 44
  • Actually I left something out that should be stated-- the hardware world is moving towards virtualization rapidly, and many of the same things driving that trend still apply in the software world. Virtual machine based RIA technology like Flex or Silverlight are the software version of that same trend, since they provide many of the same advantages. I think a key difference is that software engineers are proving much more resistant to radical change than hardware engineers have been. Why that is, I've yet to determine or hear explained. Job security or technology evolution fatigue perhaps? – Manius Jul 31 '10 at 20:07
  • And who is to blame for all these problems? Microsoft once again. They completely froze the browser developmet for almost a decade by killing Netscape, monopolizing their browser and then stop innovating for years. Microsoft never wanted open technologies, it's bad for their business. Thank god Google has now taken the lead in the browser market and they are pushing the envelope with great innovation so the future looks promising and I hope in the near future HTML+CSS+JS can finally catch up with Flash and Silverlight. – GetFree Mar 04 '13 at 02:01
3

Comparing to HTML/AJAX/JavaScript with using Flex you get no headache with cross-browser problems, you get fancy animation and filter effects, very handy IDE (Flash builder), ActionSctipt 3 (IMHO much handy and more like Java then JavaScript).

And you should forget making app work on mobile platforms.)

Dmitrii Dushkin
  • 3,070
  • 4
  • 26
  • 37
  • JavaScript delivers fancy animation and filter effects as well. Just look at the slew of JavaScript libraries. – JohnMerlino Dec 17 '10 at 02:24
  • But we shouldn't reduce Flex or Flash to "fancy animations". My answer lists many of the very real improvements, which makes it clear why Flex/Flash is booming in the corporate/intranet world. – Manius Sep 05 '11 at 00:21
2

The way I see it, the components in Flex and the ability to create a custom component that fits your exact needs (and all of this is done by a fully object oriented approach) cant be matched by the AJAX frameworks. The AMF protocol is also a big advantage since its amazingly fast. The animations are easily created to give each component a feeling that enhances the user experience and can give to your interface a life of its own. Everything mentioned before my post also should be considered.

The open source solutions are there to use them whenever its right, and I would also use it if I wanted to build a simple site with some server side code perhaps.

But when you pass from the "website" and get to the "web application" then I think that in order to be successful you have to create material that stands out. Flex is there exactly for that.

If you can build the same experience without it go ahead and do it, good for you. :)

Nick Tsitlakidis
  • 2,269
  • 3
  • 22
  • 26
  • A good point to mention, 'websites' vs 'web applications'. A blurry distinction at times, but definitely not the same thing when the extremes are compared. – Manius Sep 05 '11 at 00:19
1

You should ask yourself why you need to use flex. Are you developing a game? A 3D graphics application on the web? Something that actually cannot be achieved with HTML?

If not, there is no reason of using flex instead of HTML. HTML is an open and standard specification, you don't need plugins, your application will run on any platform with a browser supporting html, and it will be faster and less resource-consuming. Don't fall in the error of developing in flash/flex something that can be done perfectly with HTML/AJAX. I saw some developers creating applications with flex or silverlight that consisted in just a series of forms, and it was a ridicolous waste of time and resources.

So the only way to convince your clients to use flex should be finding something you actually can't do with HTML.. and having in account that HTML5 is almost here and hardware-accelerated HTML5 browsers will be launched at the end of this year.., it will be difficult to convince people to get tied to flash/flex! :)

Alejandro Martin
  • 5,691
  • 1
  • 17
  • 21
  • "If not, there is no reason of using flex instead of HTML." Did you read my answer? Of course there are **many** good reasons. But as usual "it depends". If I were developing a mobile app, there's *no way* would I use Flex/Flash (unless it wasn't commercial). A "waste of time and resources" during development, well that partly depends on the developer's skill set, doesn't it? I hope you aren't implying that Flex dev is "slower"--it's not at all, so that's just silly. If anything it's faster development due to the tools available and many Flex SDK productivity features. Also, see my answer... – Manius Sep 05 '11 at 00:04
  • Don't make down votes based on your personal opinions. This is a place to share knowledge, not flamewars. I tried to expose facts, no opinions. But in exchange of your downvote, i will write my personal opinion: the most important reason to not to use flex, is because it is a dying technology, expected to be replaced by HTML5. And for the corporate enviroment, Silverlight is light years ahead of flash/flex, and most important, its integrated with the .NET platform. Even Adobe is starting to have doubts about the continuity of flash, and proof of that are the tools they are creating for HTML5. – Alejandro Martin Sep 05 '11 at 08:49
  • FUD? I see no problem with down votes for personal opinions if other opinions were expressed in the answer, such as "don't fall in the error" or "a ridiculous waste of time and resources". It's not a "dying" technology, nor is that a reason to abandon a more mature solution since HTML5 isn't finalized (2022?) The corporate environment is exactly the best place to use Flex (where is it booming, and used in expensive commercial products). Why do you think Flex == Flash? There's no such link - one of the major feature requests is HTML5 generation. Anyway Flash will be here for many years to come. – Manius Sep 07 '11 at 22:17
  • Equating Flex (an SDK) with Flash (a platform) just shows you haven't researched the topic fully. Compared to JavaScript/DHTML/CSS (with the numerous kludgy and fragile libraries out there) and the inconsistent browser "platform" this kludge of technologies runs in (only getting worse over time as new browsers and mobile browsers appear), Flex and Flash is still a winning combination in an enterprise environment--**for getting actual work done**. And yeah Silverlight has come a long way, and I like Silverlight as well (again, consistent platform!), it's not "light years ahead" at all. Huh? – Manius Sep 07 '11 at 22:23
1

A project shouldn't be defined by the tools you use, rather the opposite, define your project and choose the most appropriate tools to achieve your objectives.

maybe a first good step ( which you seem to have taken when you decided to "muddle into Flex" ) is to have a better understanding of these tools.

why would you compare Php frameworks with AS3/Flex? what's wrong about updating flash? or if you prefer, what's wrong about updating?!

it's great to have choice, let's not put unnecessary limitations when there's no need to do so. why not decide on a per project basis ;)

PatrickS
  • 9,539
  • 2
  • 27
  • 31
0

Its not an either or decision. Flex components should be viewed as part of a page but do not - I repeat DO NOT make the mistake of building a monolithic app in flex. I just got off a project building a massive flex app. Will never do it again. It has its uses but again, flex widgets should complement an html framework. Not the other way around.