Flex - Adobe open source solution for rich applications in a Flash Player
How and when to use Flex?
The development of applications through Flex is in fashion. The use of Flex is particularly interesting concerning the construction of interfaces that are beautiful and rich in functionality. Here are some samples of applications for which Flex is a very good solution : statistics as Google Analytics, interface of real-time trading, management games, dashboards, management project applications, …
Before Flex, the choice was simple : make interfaces enriched with JavaScript (this can sometimes be very arduous especially when the cross browser compatibility needs to be handled) or realize a Desktop application.
When Flex is not adapted
Despite the fad for Flex, it is not adapted to all situations. For example, for a simple interface displaying Flickr photos, it would be too unwieldy to realize in Flex ; a simple JavaScript code is more than enough. Equally, flash animations interacting with a CMS should be realized in Flash. Flex is not useful as no element of the interface can be used (buttons, drop-down lists, grids… ) and the size of the generated SWF with Flex is large.
A few words on Flex
Flex is composed of a language of interface descriptions (the presentation layer), of the programming ActionScript 3 language (the control layer) and of a compiler which allows SWF files to be generated. As many resource descriptors (.NET, .HTML …), Flex interfaces are described in XML, the MXML. The AS3 (ActionScript 3) is an ECMA script used in Flash. Finally, the compiler Flex Builder allows the executable files to be generated, namely SWF files like the regular Flash. As a matter of fact, Flex Builder will transform your MXML files in graphic resources completed by the interactivity of your AS3 scripts. At the end, you obtain a normal Flash. Technically, it could be possible to change any Flex application into Flash, but this would be particularly laborious.