Flash or Flex or Both?

Last year lots of Flash developers wouldn’t think Flex 2 is suitable for web applications – longer loading time because of the size of Flex framework. Things changing at least recently, some big companies began to use Flex applications on their website officially, Yahoo!, Philips. I guess it partly because Adobe promised them before announcing the Flex caching solution inside Flash player. So here comes a question, Flash or Flex, or both?

Creative Flash CS3 is sitting inside creative products list of Adobe, while Flex focus on enterprise solutions. It’s clear when you design/develop with Flash CS3, you have the most creative and freedom to do everything. A simple reason is, Flex actually a house of Flash, a framework with a big collection of Flash classes. In the meaning of creative, you can do everything with Flash CS3 what Flex 2 can do. In Flex 2 you could also change components style, use bitmap images and Flash swfs to change skins and make them much friendly and beautiful. Though you have to do these with cautions in Flex – Flex has its own structures, listeners, display layers, rules.

Development Speed Last year when Adobe announced Flex 2, it was said ‘Flex is Fast’. Yes, make a Flex application within 5 minutes, make something magic with several classes, and you could change style and skins easily. In real productive projects, it’s true for talent Java developers, while not true for Flash developers. Why? For Java developers, with Flex they don’t have to learn Flash drawing/timeline techniques, they can easily move Java code into Flex projects, and soon a nice business application, better then user interface with Java, styling and skinning, transitions and effects, and get benefits of high acceptance of Flash player, how cool and how fast it is! But for Flash developers, why not the same? Simply, it depends. Flash developers will compare Flex applications to Flash web applications that talent designers made, will think about how to make better and perfect user experiences, how to make a beautiful transition that designers hope, will think this is not perfect enough I want to change, will have a favor to work with Flash player API classes, will like to customize Flex components here and there. And how to? If lucky you find a solution by searching google and Flexcoders mail list, or you have to find dig functions/events that you couldn’t find from examples of documents or books, worse you call some mx_internal properties, or push additional listeners for something because of ‘private’ properties you have no right to change and dig their values, the worst, stop and wait somebody do that. A question is: why life is so hard in Flex? It SHOULD be several lines only to change in Flash AS3 classes but in Flex it have to go over more steps and more hours? Honestly, if not so curious the way of Flash designers/developers, Flex applications could be faster than code in Flash(still depends, customers/managers may not satisfied, you have to make those hard parts happen). Be sure to walk on the road of Flex, you can be faster than walking on wild land, and, stop before the red sign.

Performance Although Flex was optimized quite much with Adobe’s own techniques, Flex will at least use more memory, extra listeners, extra resources that might useless for current project. When I opened more than 5 tabs of Flex applications in Firefox, in some case performance became a problem. Maybe they could be changed to ‘silent’ – close listeners, clear garbages when browser window is changed to inactive. Testing Flex is a Flash framework – tested. So you can get benefits from Flex, and save testing time and testers. If you want to make components in Flash the same Flex framework doing – I tried to do some of them before – wasting time. You have no much dedicated time and testers that Adobe engineers had.

So, Flash or Flex? I think these are for Flash only projects:

  • Simple, clear structure, more creative.
  • Games.
  • No much standard forms, controls.

More likely Flex:

  • Bunch of forms, standard controls.
  • Stable and functions more important than eyes candy.

How about Both? Flex of course has limitations of creative. Surely some projects need them work together, and get benefits from both side. There could be several methods to use them:

  • Flash application to load Flex application on runtime, better user experience with Flash power and flexible.
  • Flex application to load Flash application, some sort of.
  • Flash UIMovieClip to be used inside Flex, works as a component.
  • Flash CS AS3 classes extends UIComponents inside Flex, load symbols from Flash SWF file. I thought it’s hard before I tried this the first time, but find not so much.

4 Comments so far »

  1. Tim said

    am March 14 2008 @ 12:38 pm

    Flash CS3 is the way of the future. Adobe is taking all the componets Flex had and putting them in Flash. Example: I came across a simple image loader app written in both Flex and Flash (Actionscript 3.0). The Flash version had 3 simple Actionscript files. The Flex version had a wopping 22 files, not only did it have 22 files, they were all different types of files too. Of, course the majority of people support Flex, but only because it is free unlike Flash fo what $800 bucks. Your going to get more people learning how to program in Flex if it’s free. Here’s the catch, Adobe is playing the hook line and sinker strategy. Adobe made Flex so people would learn how to code in Actionscript. Then they start to limit features in furture releases of Flex, and improve the features in Flash. WHY?…Because Adobe wants all the people who learned Actionscript to go out and purchase Flash for the $800. Microsoft is doing the same thing with Silverlight. How else do you get people interested in a product, make the software free at first to get people hooked then start to charge them for the newer improved versions. Economics 101. Create a big demmand, then limit the supply, force people to pay big bucks. I know I wouldn’t pay $200 – $800 for new software unless I got to try it first. And 30 day demos aren’t enough to get people hooked. You may think I am wrong, but just wait you’ll see.

  2. hank said

    am April 6 2009 @ 9:58 pm

    been thinking about getting into flex, but after this interesting analysis, I’ll stick with flash and just dive deeper into actionscript as needed. thanks.

  3. Erwan said

    am May 5 2009 @ 9:31 am

    Thanks for this explanation, it’s exactly what I was looking for! I’ve been trying flex, but I’ve not been convinced at all… so i’ll stick with the combination that works the best for me : flashdevelop/flash !

  4. Burhan said

    am June 24 2009 @ 4:20 am

    But adobe also sells the the product Flex Builder for $250. May be they are planning to make Flex more stable and improve the features, than sell it for $800, for example. Is that possible? I know Flex SDK is free but Flex Builder is much more userfriendly, isnt it? What do you think? Thanks.

Comment RSS

Leave a comment

Name: (Required)

eMail: (Required)