40

I've tried looking everywhere for a concise list of the advantages and disadvantages of using Flex vs. Flash.

Coming from a programming background, I absolutely love Flex. It's easy to pick up, and since it can use flash classes, why would I want to use Flash without flex?

Flex:

Pros:

  • good for RIA development
  • provides many user-input options out of the box
  • Build in lay-outing system
  • the MXML is easier for non-programmers
  • You can quickly combine components to create small applications
  • components can provide an advantage in large-scale projects because of their modular nature.
  • can be developed using linux
  • has a nice component lifecycle for validation, etc.

Cons:

  • increases the size of your .swf
  • Customizing the look of components can take a lot longer than anticipated, depending on the visual style you're looking for
  • when you find out you need a custom component that doesn't exist, you might need to go back to Flash to do the real programming work and packaging of the component
  • The "flexibility" of Flex means you will be reading a lot of documentation
  • Bugs in the Flex framework
  • You eventually will need to compromise with the architecture of the Flex framework

Flash

Pros:

  • good for making movies/animations
  • Timeline can be easier for designers/animators to conceptualize
  • when working from scratch, provides a great deal of control.
  • easier for someone with a programming background
  • You can program whatever you like; no compromises with existing frameworks

Cons:

  • only provides basic user input (text box) out of the box.
  • timeline can be daunting for programmers (although you can quite safely ignore it)
  • Development of certain types of applications will be slower than with Flex
  • can't be developed using linux
  • user input validation must all be handled in the code. No built-in validation.
  • need to implement your own lay-outing system

Please correct me if I missed anything said so far.

Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
Zack Marrapese
  • 12,072
  • 9
  • 51
  • 69

12 Answers12

17

Flash and Flex both use the same underlying rendering engine, just with different front-ends. Flash is better suited for making movies and animations. Flex is better for application development.

EvanK
  • 1,052
  • 1
  • 10
  • 23
  • 7
    That is a bit of an apples to oranges comparision imho. In Flex you can't make (timeline) movies and animations at all. But both Flex and Flash allow you to develop applications. – Niko Nyman May 05 '09 at 20:13
  • So both versions will be killed in 2020? – Splash Jun 04 '20 at 12:23
9

From a programmer's viewpoint, the big difference between Flash and Flex is not so much which IDE/application you use for programming, but whether you program in ActionScript (AS) only, or use the Flex framework and MXML to program your applications.

I would say pure ActionScript is better for programming (whether you use Flash IDE or Flex IDE is not that relevant), and MXML is better for non-programmers to combine the components programmed in AS.

I would add to your list these pros/cons:

Flex:

Pros:

  • Easier for non-programmers to get into application development
  • You can quickly combine components to create small applications
  • Components can provide an advantage in large-scale projects

Cons:

  • Customizing the look of components can take a lot longer than anticipated, depending on the visual style you're looking for
  • When you find out you need a custom component that doesn't exist, you might need to go back to Flash to do the real programming work and packaging of the component
  • The "flexibility" of Flex means you will be reading a lot of documentation
  • Bugs in the Flex framework
  • You eventually will need to compromise with the architecture of the Flex framework

Flash (or Flex IDE in ActionScript project mode):

Pros:

  • Easier for someone with a programming background ;)
  • You can program whatever you like; no compromises with existing frameworks

Cons:

  • Timeline can be daunting for programmers (although you can quite safely ignore it)
  • Development of certain types of applications will be slower than with Flex

In short: pick the right tool for the right task.

Niko Nyman
  • 1,916
  • 2
  • 16
  • 26
  • In reference to: "go back to Flash to do the real programming" If you do I am not positive it would even work in the Flex framework? – JD Isaacks May 07 '09 at 14:21
  • 1
    That was a bit vague, my mistake. The point was that for highly customized components, the most convenient way is to make and package the component in Flash, then use it within a Flex app. – Niko Nyman May 13 '09 at 11:27
8

Flex is a library of code written in ActionScript3, so it adds lots of capabilities and standard-library-like stuff to Flash. The downside is that it a is a huges amount code that gets included into your application. If you use any Flex at all in your app, the download size of the SWF goes up by 100's of K.

If your application has any kind of user interface widgets, then you almost have to use Flex as Flash itself only has the most basic things like text boxes. Flex has a whole XML GUI with layouts, data binding and XML setup etc.

Doing that in flash, you end up having to write from scratch things like list boxes...

sean riley
  • 2,633
  • 1
  • 22
  • 22
  • 1
    Actually, you have an almost equal set of components available in Flash too. But you must program in ActionScript code, not script in xml. – Niko Nyman May 02 '09 at 12:28
  • @ Niko, there are several components in Flex that are not in Flash (at least CS3 I haven't messed with CS4). For example: Canvas, HBox, ApplicatoinControlBar, Alert, RichTextEditor, Panel, Form, etc. etc. – JD Isaacks May 06 '09 at 19:08
6

In my opinion, the most important feature of the Flex framework is the component lifecycle, which provides a really elegant model for validation/invalidation of properties, component size, and hierarchical rendering.

The benefit to developers is that it creates discrete application phases for business logic and rendering, avoiding expensive geometry & rendering code until the last possible moment before drawing a frame.

Here's a really good presentation, explaining how it works:

http://tv.adobe.com/#vi+f15384v1002

The model is so well-designed that the component lifecycle remains almost entirely invisible during the majority of Flex development, when you're using the framework default components and containers. You only need to learn the inner-workings when you start developing your own components.

Developing in the Flash environment, or in pure Actionscript, you don't get any of that. Anyone developing pure AS3 applications either needs to code very carefully to separate business logic from rendering, or will suffer severely decreased performance.

C8H10N4O2
  • 18,312
  • 8
  • 98
  • 134
benjismith
  • 16,559
  • 9
  • 57
  • 80
4

[...] why would I want to use Flash without flex?

Flex is a new product, whereas Flash existed from the Macromedia days. Designer, animators and most anybody who is not brought up on a staple diet of programming education will probably find Flash easier to master than most other such solutions.

dirkgently
  • 108,024
  • 16
  • 131
  • 187
  • 2
    Flex was a macromedia product and has been around for a long time. They just had it at a ridiculous 'enterprise' price point that made it invisible to real people. Trying to make interaction on the timeline in Flash is asking for misery, designer or not. – Joel Hooks Jul 11 '09 at 03:56
3

Target is different. Flex is more dedicated for programmer while Flash is more friendly to Artist / web designer.

Francis
  • 11,388
  • 2
  • 33
  • 37
  • Out of the box, this is superficially true, but GOOD Flex applications are centered in both strong design and development - just like Flash IDE apps. – Joel Hooks Jul 11 '09 at 04:04
3

Flash is the IDE used (generally) to create animations and things that work well on a timeline.

Flex works better for creating internet applications which have interactions more akin to a desktop.

Why use Flash? Well, if you need to do something more specifically attached to a timeline, of course!

Anthony
  • 7,086
  • 1
  • 21
  • 22
2

I see Flex as more of a solution for doing RIA applications where you need to develop application based solutions. There's quite a lot you get right out of the box with using Flex but it also comes at a price in terms of file size, granularity, etc.

If on the other hand you are working on a totally custom solution such as a game then perhaps Flash is the way to go because you can start fresh with a blank canvas. Many people still use Flash because they don't need all the app based bells and whistles of the Flex platform.

Ralph Caraveo
  • 10,025
  • 7
  • 40
  • 52
2

I like the freedom of Flash, and its really simple to embed assets in Flash, a little more confusing to do in Flex.

One thing that I love about flex is the ability to make a fluid application with minimal effort. Which would take forever in Flash.

Anything you can do in flex you can do in flash, just may take a lot longer to do. You can't do everything in flex that you can do in flash though.

Flex takes care of all the UI programming for you and lets you focus on the business logic, with flash you will spend a majority of time programming the UI.

JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
2

You can develop Flex applications under Linux easily but with Flash you simply can't.

Ertuğ Karamatlı
  • 898
  • 1
  • 6
  • 7
  • No reason you need to use the Flex framework with Linux. It will compile straight flash without the framework linkage just fine. – Joel Hooks Jul 11 '09 at 04:03
1

Another solution that was not suggested at here, will be to use them both. You can add flex components to flash movie clips using ContainerMovieClip. And you can add flash movie clips to flex components using SpriteVisualElement. Another thing that wasn't mentioned was lay-outing your application. It will be flex pros against flash disadvantage, because you got build in flex lay-outing system. But again when you are using them both, you can layout your movie clips with flex lay-outing system.

Also flex become Apache top-level project. And it become more and more excepted by the community now.

Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
0

Flash and Flex are 2 complete different things, one is a design tool with support for action script, the other one is a framework that also has action script but is maily built around MXML which is a XML based UI definition "Language".

Oakcool
  • 1,470
  • 1
  • 15
  • 33
  • 2
    It isn't really built around MXML, MXML is really built around AS...whenever the app is compiled all the MXML gets converted to AS code. – JD Isaacks May 06 '09 at 19:09
  • 1
    The percentage of MXML to AS in my Flex framework linked applications is probably 25/75 mxml/as if not more. The Markup is simply there as a convenient way to layout containers. Everything else lives outside of the view. – Joel Hooks Jul 11 '09 at 04:06