The Difference Between Flex and Flash May 28, 2009

Today I have been exploring the world of Flex/Flash development. The first question that usually gets asked is “what is the difference between Flash and Flex…” Well, interestingly, the difference is primarily in the development paradigm. Essentially the end result is the same, usually a ‘.swf’ file playing in a browser or running using Adobe AIR or as a standalone file.

There are a number of products and technologies involved at a very basic level.Firstly, the original Flash program. This is a package aimed primarily at designers and animators. It uses the ‘movie’ analogy and a drag and drop interface, much like a drawing program, to allow you to create and then export as a ‘.swf’ file. Flex Builder is an Eclipse based IDE designed to be more functional to the programmer. It has all the usual  IDE elements, and in fact also includes a basic ‘design’ view, which includes some drag and drop functionality. In Flex Builder, you develop primarily in ‘mxml’. This is a markup language a bit like HTML, but seemingly more organised. You build applications by adding tags which represent components, which are styled by the equivalent of style sheets. Running through these two apps like a thread, is Actionscript, the ECMAScript based programming language used to manually program SWF files. The two applications don’t require you to write any Actionscript, but when your application gets a bit more complicated, it starts becoming necessary. You can include Actionscript in your Flex Builder apps by adding ’script’ tags, a bit like you would Javascript in an HTML file.

The final option for Flex development, is the Flex SDK. You can download it for free. The SDK gives you a number of command line tools, which appear identical on Windows, Mac and Linux. The tools allow you to compile SWF files from handwritten Actionscript files. This allows you to use your text edite/IDE of choice. It is also the only way to build  a Flex application without buying expensive development tools from Adobe.

In summary, Flash is more suited to non-programmers and Flex is  more programmatic in it’s approach.They are capable of producing the exact same result, just through different methods.

Leave a Reply