Flex
Flex is a collection of technologies that enables you to rapidly build applications deployed to Flash Player, a runtime environment for delivering sophisticated user interfaces and interactivity. Flex leverages existing, matured technologies and standards such as XML, web services, HTTP, Flash Player, and ActionScript.
Using the Flex framework you can build and compile to the .swf format. The compiled .swf file is an intermediate bytecode format that Flash Player can read. FlashPlayer 9 introduces a new virtual machine called AVM2. AVM2 brings the best of both worlds. Since .swf content is compiled to bytecode that the ActionScript virtual machine can understand, the .swf format is platformindependent.
The Flex framework is synonymous with the Flex class library and is a collection of ActionScript classes used by Flex applications. The Flex framework is written entirely in ActionScript classes, and defines controls, containers, and managers designed to simplify building rich Internet applications.
The categories of Flex Flex class library are
Form controls
Form controls are standard controls such as buttons, text inputs, text areas, lists, radio buttons, checkboxes, and combo boxes. In addition to the standard form controls familiar to most HTML developers, the Flex class library also includes controls such as a rich text editor, a color selector, a date selector, and more.
Menu controls
Flex provides a set of menu controls such as pop-up menus and menu bars.
Media components
One of the hallmarks of Flex applications is rich media support. The Flex class library provides a set of components for working with media such as images, audio, and video.
Layout containers
Flex applications enable highly configurable screen layout. The layout containers to place contents within a screen and determine how they willchange over time or when the user changes the dimensions of Flash Player. With a diverse set of container components you can create sophisticated layouts using grids, forms, boxes, canvases, and more. The elements can place with absolute or relative coordinates so that they can adjust correctly to different dimensions within Flash Player.
Data components and data binding
Flex applications are generally distributed applications that make remote procedure calls to data services residing on servers. The data components consist of connectors that simplify the procedure calls, data models to hold the data that is returned, and data binding functionality to automatically associate form control data with data models.
Formatters and validators
Data that is returned from remote procedure calls often needs to be formatted before getting displayed to the user.
The Flex class library includes a robust set of formatting features (format a date in a variety of string representations, format a number with specific precision, format a number as a phone number string, etc.) to accomplish that task.
Likewise, when sending data to a data service from user input, you’ll frequently need to validate the data beforehand to ensure it is in the correct form. The Flex class library includes a set of validators for just that purpose.
Cursor management
Unlike traditional web applications, Flex applications are stateful, and they don’t have to do a complete screen refresh each time data is sent or requested from a data service. However, since remote procedure calls often incur network and system latency, it’s important to notify the user when the client is waiting on a response from the data service. Cursor management enables Flex applications to change the cursor appearance in order to notify the user of such changes.
State management
A Flex application will frequently require many state changes. For example, standard operations such as registering for a new account or making a purchase usually require several screens. The Flex class library provides classes for managing those changes in state. State management works not only at the macro level for screen changes, but also at the micro level for state changes within individual components.
Flex provides the ability to easily apply transitions so that state changes are animated.
Effects
Flex applications aren’t limited by the constraints of traditional web applications. Since Flex applications run within Flash Player, they can utilize the animation features of Flash. As such, the Flex class library enables an assortment of effects such as fades, zooms, blurs, and glows.
History management
As states change within a Flex application, the history management features of the Flex class library enable you to navigate from state to state using the back and forward buttons of the web browser.
Drag and drop management
The Flex class library simplifies adding drag and drop functionality to components with built-in drag and drop functionality on select components and a manager class that allows you to quickly add drag and drop behaviors to components.
Tool tips
Use this feature of the Flex class library to add tool tips to elements as the user moves the mouse over them.
Style management
The Flex class library enables a great deal of control over how nearly every aspect of a Flex application is styled. You can apply style changes such as color and font settings to most controls and containers directly to the objects or via CSS.