07 August 2007

Two Flavours of AS3?

Actionscript 3 was first introduced with Flex 2 in the summer of 2006. At this time Macromedia (the inventors of Flex and Flash) were being acquired by Adobe. Previous to the acquisition all Macromedia class packages were prefixed with "mx" e.g. "mx.controls.Button".

Flex 2 kept the Macromedia "mx" naming convention and it seems Flex 3 (due for release later in 2007) will do the same. However Flash CS3, has been "Adobefied" and class packages relating to Flash CS3 are prefixed with "fl" e.g. "fl.controls.Button" - makes sense though.

These class libraries share a lot in common, though it appears that the Flex libraries are more extensive than Flash CS3. It'll be interesting to find the boundaries between Flash and Flex Actionsctipt as we use it more.

Flex is component based and is used to build rich user interfaces quickly and easily - it's kind of a "Flash for Web Developers". Flash is more graphical and suited to visual presentations and games. Under the hood, they are essentially the same, Flex and Flash are programmed in AS3 and except for the MXML interpreter in Flex, the AS3 compiler (I currently believe - I may be wrong) is the same.

This raises some important questions:
  • Can the Flex 2 compiler be used to compile AS3 for Flash?
  • Will we have 2 flavours of AS3?
  • Why buy 2 products that build swf's?

Ultimately I think the answer is that Adobe can have two $500 applications for sale rather than one. It is quite confusing (well it confuses me)! Should we now be called "Actionscript Developers" not "Flash" or "Flex" developers?

This may be a good thing. For example, Java developers have many different routes to choose from and a Java developer who knows his/her beans (so to speak) get high-end salaries / contracting rates. It could also root Actionscript 3 as a "proper" programming language for RIA's (Rich Internet Applications).

Another possibility is that Adobe merge the Flash timeline, library and drawing tools into the Flex Builder. Although that's probably never going to happen!

Compare the AS3 References