Matt Chotin
13 December 2007
User level
Note: this article has been updated throughout to reflect Flex 3 Beta 3. However, there are not many significant changes between Beta 2 and Beta 3. Please make sure to read the Flex 3 Beta 3 Release Notes for the most up-to-date information.
It is a great time to be a Flex developer. In June 2006 we released Flex 2, a lineup of developer tools, libraries and runtime services that enable developers everywhere to build and deploy rich Internet applications that take advantage of the Flash® Player runtime. Flex 2 has been hugely successful with tens of thousands of new developers, a vibrant community that shares tips, tricks, and code, dozens of commercial and open source components and other add-ons, and of course hundreds of new applications built, with more coming online every day. In the short lifetime of Flex 2, we've seen Flash Player 9 follow the traditional penetration pattern of previous Flash Players and reach over 94% penetration in mature markets (as of September 2007). Finally, we were pleased to see Flex win its second Jolt Award, this year in the web development category.
We've also seen great success with LiveCycle Data Services ES, formerly Flex Data Services. LiveCycle Data Services ES enables developers to build applications that are not only rich in terms of user interface, but also in terms of how data flows between tiers, and also in terms of the innovative services these applications can offer. With new features like LiveCycle ES application integration, PDF document generation, and integration with more frameworks such as Hibernate and Spring, LiveCycle Data Services ES provides the ultimate solution for connecting RIAs to J2EE infrastructure. To top things off we’ve just announced BlazeDS, the new open-source version of our Java remoting and HTTP-based real-time messaging technologies. Check out the release notes for BlazeDS.
In addition to adding support for the Adobe® Integrated Runtime (Adobe® AIR™, formerly known as Apollo), Flex 3 is focused on enabling more people to participate in building rich Internet applications and enhancing the platform with the top features requested by existing users. While Flex 2 was a big change for users who had previously built applications with Flex 1.5, Flex 3 does not introduce any language changes and is expected to be backwards-compatible with Flex 2 in all major use-cases. Any differences in behavior are documented in the release notes and most changes can be set to behave the same as in Flex 2 by specifying a compatibility flag. There is no new Flash Player requirement for Flex 3; all versions of Flash Player 9 will support Flex 3 applications. Flex 3 will also work seamlessly with LiveCycle Data Services ES.
This past June, we pushed out our first public prerelease of Flex Builder 3 and Flex 3. Unlike previous public betas, where development is nearly complete, this first beta was much earlier in our development process. The response to that beta was very positive, and we incorporated a ton of feedback gathered from our new public bug system into our second beta in September. Now we are releasing our third beta which incorporates even more feedback and is very close to what we expect for our final release.

Flex 3 features

The Flex 3 release is divided into four major themes: designer/developer workflow, working with data, Adobe AIR applications, and platform evolution. Let's quickly review some of the highlights:
  • Native support for Adobe AIR – Flex 3 introduces new components and incorporates the Adobe AIR development tools into the SDK and Flex Builder.
  • Persistent framework caching – You can make Flex 3 applications as small as 50K when leveraging the new Flash Player cache for Adobe platform components.
  • Flex Builder productivity enhancements – Flex Builder 3 introduces refactoring support, new profilers for performance and memory tuning, and code generation tools for data access.
  • Integration with Creative Suite 3 – The Flex Component Kit for Flash CS3 allows Flash CS3 users to build components that can be seamlessly integrated into a Flex application, while Flex Builder 3 adds new wizards for importing assets from CS3 applications as skins.
  • Advanced DataGrid – The Advanced DataGrid is a new component that adds commonly requested features to the DataGrid such as support for hierarchical data, and basic pivot table functionality.
  • First steps toward open source Flex. As a first step toward making Flex an open source project, we've opened up the Flex and Flex Builder bug tracking system to the public, as well as published detailed roadmap information.
Details of these features and more are available in the sections below.
Designer/developer workflow
Most developers and managers know that improving the usability and overall experience of online applications can deliver increased productivity, reduce support costs, increase customer satisfaction, and drive top-line revenue. Flex 2 allows developers to build truly unique experiences, but it is not as easy as it could be. With Flex 3 we are introducing features in both the Flex SDK and Flex Builder to address this issue, as well as providing smooth integration with the recently released Creative Suite 3 products.
We have created a new Flex Component Kit for Flash CS3 that provides a complete workflow for authoring content in Flash that can be seamlessly integrated into a Flex application. Flash users can now develop components in the familiar timeline model of Flash and then, by following a few simple patterns, can enable Flex developers to incorporate those components with no additional code. The Flex Component Kit is a simple MXP that includes the relevant SWC and JSFL commands to get a Flash designer up and running with Flex development immediately.
Flex Builder has added new wizards to support the easy skinning of an application. Designers can start with optional templates to create artwork in the CS3 application of their choice: Flash, Fireworks, Illustrator, or Photoshop. When ready, a Flex developer can then import the artwork into their project and apply them as skins for their components.
Flex 3 also makes design tasks easier for Flex Builder and Flex SDK users as well. The Flex Builder design view has been enhanced so that it can accurately preview item renderers, and we've added pan and zoom tools to provide more fine-grained manipulations. Lastly, a new Visual CSS Editor allows Flex Builder users to graphically manipulate the skins and styles of Flex components. This user interface is similar to the popular Flex Style Explorer and will allow roundtrip editing of an application's CSS.
The Flex framework has also been enhanced to allow for greater design flexibility. The Flex “box” model for layout provides a simple mechanism for creating fluid layouts, but sometimes the model does not reflect the intentions of a UI designer. Flex 3 expands on the constraint-based layout system introduced in Flex 2 to accommodate more complex systems, such as sibling-relative positioning.
Also, check out the new Flex Interface Guide, from Rob Adams. The information in the guide will help you design your RIAs and rich desktop applications, and will be continually updated with design advice and components for your use.
Working with data
Rich Internet applications are often focused on enabling users to work with data. Flex provides a number of data visualization components such as the List, DataGrid, Tree, and many different charts. To access data to display in these controls the Flex SDK offers a number of services including the HTTPService for accessing REST-style data, WebService for accessing web services exposed via SOAP, and RemoteObject for accessing web services exposed via the compact binary AMF protocol. Flex 3 makes it easier for developers to use the Flex services to access data, and enhances and adds to the data visualization controls that can display that data.
Users who are new to Flex often need help learning how to reach the data stored on their servers. We have added new wizards into Flex Builder 3 to assist in that task. A simple user interface guides the user in connecting to their database and gives the user the choice of generating server-side PHP, Java, or ASP.NET code to expose their data. The wizard will also generate all of the MXML and ActionScript code necessary to power a basic Flex application that demonstrates standard CRUD operations against the user's data via simple REST calls. The developer can then take this code and modify it however they want to incorporate it into future applications.
SOAP web services are one of the most popular ways for developers to access data in Flex applications today. Flex Builder 3 adds support for Web Services Introspection to make this kind of data access even easier. Flex Builder 3 will introspect a WSDL and automatically generate code to allow easy invocation and handling of web service operations. In addition to providing code hinting on which methods can be called on a service, the generated code will deserialize responses into strongly typed objects, making incorporation into the rest of the Flex application even easier.
The Flex 2 Charting package is a set of powerful charting components used in many Flex applications to visualize data. Flex 3 improves this package by adding a number of enhancements requested by users. The axis system can now support multiple axes, and the DataTimeAxis allows for work-week filtering. A new data-oriented graphics API allows you to draw data coordinates, leaving the chart to render everything in its proper screen position. Finally we've enhanced the formatting options and added interaction capabilities to all of the existing charts.
There is a new component available in the data visualization package, called the Advanced DataGrid. A popular request, the Advanced DataGrid extends the standard Flex DataGrid to support hierarchical data (such as a TreeGrid), more column options like grouping and multi-column sorting, and supports much more control over formatting to enable visualizations like summary rows. New collections APIs make it easy to feed data into this grid, including support for simple OLAP-like queries.
Adobe AIR applications
The Adobe Integrated Runtime (Adobe AIR, formerly known as Apollo) enables developers to create applications that combine the benefits of web applications—network and user connectivity, rich media content, ease of development, and broad reach, with the strengths of desktop applications—application interactions, local resource access, personal settings, powerful functionality, and rich interactive experiences. Adobe AIR applications run as regular desktop applications, and do not have to run within another application or shell (as web applications must do by running within a web browser). Flex 3 introduces official support for Adobe AIR by introducing new components meant to leverage Adobe AIR capabilities and incorporating the Adobe AIR development tools into the Flex SDK and Flex Builder.
Adobe AIR includes support for rendering high-fidelity HTML using the open-source WebKit engine. The Flex framework now includes an HTML control that can render HTML and support basic events like knowing when a link is clicked while working within the Flex layout system.
Adobe AIR supports multiple windows per application. Flex introduces a new Window component, which supports both custom and native-OS chrome and enables common window operations such as resizing, minimizing, maximizing, and so forth. Flex applications meant to run in Adobe AIR can use the new WindowedApplication class to provide that same window functionality as part of the main application.
Finally, concepts like drag and drop which often have more functionality on the desktop than on the web have been incorporated into the Flex framework so that an application running in Adobe AIR can leverage the additional capabilities available.
The Flex SDK includes all the tools necessary to build, debug, and package Adobe AIR applications. Flex Builder has also been enhanced to provide full support for targeting Adobe AIR, meaning developers can code, debug, profile, package, and sign Flex applications using the same great tools they've used for building Flex applications that target the web.
Platform evolution
While Flex 2 was a fantastic release, we did not have time to add every feature we wanted to. Flex 3 continues to work towards providing the most powerful platform for delivering RIAs by enhancing the tooling provided and providing some key improvements to the Flex framework.
One issue that we often hear about is the download size of a simple Flex application. The Flex framework is very robust, and unfortunately the cost of that robustness is its size. Developers who built multiple Flex applications could extract common code between the applications into a runtime shared library (RSL), but most applications could not truly leverage an RSL in this manner. The Flash Player update supports a new cache for Adobe platform components, and the Flex framework qualifies for this cache! The Player cache is different from the browser cache in that it is maintained by the Flash Player; therefore, it is not cleared at the same time as the browser cache, and will only store items that have been signed by Adobe. The first time an end-user downloads a Flex application configured to use the framework as an RSL, the user will receive a permanent copy of that RSL. The next time the user sees a similarly configured Flex application (regardless of where it comes from) the Player will use the copy of the framework from its built-in cache.  Configuring a Flex application to use the framework as an RSL will result in a size reduction of anywhere from 90K to 500K. Note that this feature is implemented in a backwards-compatible manner so that end-users who do not have the latest Player will not be forced to upgrade to view the application. Read more about the Flash Player update.
While the new virtual machine introduced in Flash Player 9 is orders of magnitude faster and has better memory management than previous Players, it is still possible to write an application that has performance or memory problems. Flex Builder 3 includes two new profilers to assist in tracking down these issues. The performance profiler tracks method invocations, including how long executions last in any given area so that developers can determine where the application's performance can be optimized (or a time lag can be eliminated altogether). The memory profiler allows developers to take snapshots of an application while it is running and track down objects that may be sticking around unexpectedly. With these new tools, Flex applications will really scream!
Making an application fast is all well and good, but what can we do to speed up development? Flex Builder 3 introduces new language intelligence features to support refactoring. Now developers can find all references to a class, variable, or method, rename it, and update all classes at once.
Flex applications do not always live alone. In fact Flex applications are often embedded in a larger HTML application. We are making the integration between Flex applications and their HTML wrappers easier by including a few different pieces of functionality. First, the Flex-Ajax Bridge library is now an official part of the Flex SDK, available as part of the included frameworks. Next, Flex Builder now has wizards for generating JavaScript to call into a Flex application easily. Now a Flex developer can expose properties and methods from the Flex application so that a JavaScript developer can call in without needing to know the internals of the application, leveraging whichever JavaScript code hinting his or her editor may support.  Finally, the Flex framework has introduced a BrowserManager class to enable developers to easily interact with the browser in a cross-browser manner. The BrowserManager allows developers to update the browser's address bar so that users can bookmark locations within the Flex application that will notify the developer if the address bar has changed so that the application can set itself to the proper state.
Flex 2 supported global applications by supporting resource bundles and allowing applications to be compiled for a specific locale. Flex 3 expands upon this by allowing applications to change their locale at runtime.  Similar to the Flex 2.0.1 runtime styling support, a Flex application can now be compiled one time to use as many locales as the developer specifies, switching between locales at runtime. New locales can be downloaded at runtime as modules as well.
Finally, while Flex 3 probably sounds exciting, developers may be in the middle of Flex 2 projects that simply can't upgrade immediately. Not to worry; Flex Builder 3 supports building applications for Flex 2.0.1 as well! Simply choose the 2.0.1 SDK in the project properties panel and the application will behave as it did before. Features like refactoring will still work against the 2.0.1 SDK. When you're ready to upgrade to the new SDK, simply change the project to use Flex 3 SDK and everything will be set.

Greater transparency and open-sourcing Flex

In addition to all of the great features that will be part of Flex 3, we've also announced that with the Flex 3 release the SDK components will move to an open-source model. During the first beta we rolled out the first part of our open source infrastructure.
Our new public bug tracking system, built on top of JIRA, is open for viewing and submitting bugs. In addition to the core Flex SDK bugs, users will also have access to Flex Builder issues. No need to file bugs through the wish form and wonder if they've disappeared. You will be able to track all bugs submitted by Adobe employees and the public from the new system.
Additionally the Flex SDK now has nightly builds posted so that one can verify a bug fix the very next day. Nightly builds will generally be unstable so it is not recommended to use a nightly build for real development, but for checking out a new feature or verifying a fix they're great!
Finally, a new Flex Wiki has been posted that contains planning documents for Flex 3 so developers can gain more visibility into the features of the release. We will be beginning the planning stages for Flex 4 pretty soon and will maintain a public Wiki so developers can track that as well.
We're excited to be taking this first step in the migration to an open source project and to be further increasing our transparency around the future roadmap of Flex. We'll be rolling out more of the open-source infrastructure over the summer. Read more information on the above and the rest of our open source plans.

Get started today

What are you waiting for? Download the betas for Flex Builder 3 or the Flex SDK 3 today and check out all of the new functionality.  Send us feedback through the bugbase and forums! We can't wait to see what you build!