Try to imagine building interactive web-based tools as easily as using Access. Flex 2 is a development environment for creating Flash applications with a powerful user interface comparable to a desktop client: the territory that Ajax is carving out so effectively, in other words. Based on Eclipse, Flex Builder 2 is an IDE for developing such tools, an essential part of the Flex system.

Core components are supplied in the Flex 2 framework and SDK. The Flex 2 framework provides a library of over 100 components and containers, from simple buttons to advanced controls such as data grids or rich-text editors. You can use these components to create application interfaces and sub-class them to modify behaviour, or you can create your own components from scratch using the component API.

Flex applications are written using MXML, an XML-based language that provides a declarative approach to controlling an application's visual appearance. Using MXML, you can position components; specify constraints to enable a more dynamic user interface; and use View States and Transitions to control how the application should respond to different user actions and events. To customise the look and feel of an application, you can set built-in style properties through Cascading Style Sheets or attach custom visual assets.

Flex applications access data and services through a set of built-in service components. They can access XML data through HTTP and web services, as well as the Flex Data Services 2 server-side component. Available separately, this J2EE application enables the use of remote Java objects and publish-andsubscribe messaging, and provides a rich data-binding infrastructure that enables applications to remain responsive, even when waiting for server-side requests to complete.

At its heart, Flex Data Services 2 offers a robust infrastructure for moving data between the client and server and can handle real-time data and very large data sets. This can significantly reduce the amount of time spent writing, debugging, and maintaining code.

Linked with Flash

The Flex framework builds upon Flash 9 and the new ActionScript 3.0 language, which is based on the ECMAScript standard that also underpins JavaScript. AS3 also includes the E4X (ECMAScript for XML) standard, which extends the language to natively deal with XML.

Flash 9 also provides an API to enable communication between applications running in the Flash Player and the browser's document object mode (DOM) and any available JavaScript functions. Adobe has released Flex-Ajax Bridge, a small library that supports interaction between your Flex application and the browser DOM.