Accessibility
David Wadhwani

David Wadhwani

Adobe

Created:
17 October 2005
Modified:
27 June 2006
User Level:
All
Products:
Flex

Flex 2: Enabling the Next Generation of Rich Internet Applications

Important note: Effective with the release of Adobe LiveCycle ES, the Adobe Flex Data Services 2 server product has been rebranded as a Solution Component of LiveCycle ES. This article was written based on Flex Data Services but will likely work as is with LiveCycle Data Services ES. Any articles referring to or using ColdFusion and Flex Data Services are not compatible with LiveCycle Data Services ES. To learn about the new capabilities of LiveCycle Data Services ES, see the tutorials in the LiveCycle Developer Center and read about Adobe LiveCycle Data Services ES.

In October 2005, Macromedia (now Adobe) provided the developer community with the first look at Adobe® Flex™ 2—a new lineup of developer tools, libraries and runtime services that will enable developers everywhere to build and deploy rich Internet applications that take advantage of the Flash® Player runtime. Since then, tens of thousands of developers have started to build applications with Flex and provide their feedback to us. Additionally, Macromedia became part of Adobe, opening up a whole new world of opportunities for improving the future of Internet applications.

With the announcement of the Flex 2, we're proud to show the results of the development cycle between October 2005 and June 2006. By combining an intuitive programming model, a powerful Eclipse-based IDE, and a rich set of J2EE-based runtime services, we believe that the Flex 2 product line provides developers the most comprehensive solution for delivering cross-platform rich Internet applications available today. The recently announced pricing structure allows developers to build and deploy many kinds of applications for free without needing to install anything on their servers. And recent releases of technologies like the Flex-Ajax Bridge and Ajax Client for Flex Data Services under open source licenses allow developers to incrementally add Flex components to existing websites and applications, whether they are based on static HTML or Ajax technologies.

Pushing the envelope on RIA development

In early 2001, Macromedia coined the phrase "rich Internet application" after seeing what developers and designers were building in Macromedia Flash. It was clear that these applications extended the design limitations and interaction constraints of traditional HTML applications. They didn't require a full page refresh when users interacted with them. They used network bandwidth efficiently, transmitting only the portion of the data that changed and minimizing the transfer of layout information. They contained a rich array of interactions that allowed end users to directly manipulate data. They seamlessly layered audio and video into the application's user interface. They clearly maintained their context as the user navigated through the application. And, of course, they supported high-fidelity printing.

The effect of rich Internet applications has been incredible, both in breadth and depth. We're seeing everyone from Internet hobbyists to large enterprises building RIAs—and seeing their business improve dramatically as a result. Large financial services institutions are using RIAs to solidify their brand with customers and speed up internal business decision-making through better interaction with mission-critical data. Online retailers have reduced shopping cart abandonment by 50% during the checkout process. Individual developers have integrated slick online mapping services with webcams posted on New York City's traffic lights to give commuters the most up-to-date and useful traffic information.

As customers began to broaden their use of rich Internet applications, developers quickly recognized some special needs. Some RIAs need to consume real-time data feeds. Others need to run in occasionally connected environments, intelligently synchronizing data when a connection is established. Some need to consume proprietary binary protocols. And still others require that multiple clients share a single instance of data.

Based on our work with these early adopters, we set out to deliver an RIA platform that addressed these needs and could be extended easily to meet the specific needs of a wide range of applications. We wanted to give developers a client runtime, development environment, class libraries, and data services to help them:

  • Be extremely productive in RIA application development
  • Create expressive applications with effective interface patterns
  • Deploy applications through a well-distributed, high-performance, cross-platform, cross-browser runtime environment
  • Use tools and technologies that scale with the size of the project and complexity of the task

We are thrilled to introduce the Flex 2 product line as the best way to build a wide range of immersive applications, from simple restaurant menus to complex workflow systems and synchronized trader desktops.

If you're familiar with Flex 1.0 or 1.5, it's very important to recognize that Flex 2 is far more than just a new release. From a technical standpoint, Flex 2 introduces new capabilities that enable developers to build an entirely new class of rich Internet applications. At the same time, Adobe Flex Builder™ 2 has been built from the ground up on the Eclipse open-source IDE framework and now includes the Flex framework and the compiler. In addition, the ColdFusion® and Flex teams have worked closely together to provide ColdFusion-specific integration points between Flex Builder, Flex Data Services, and the ColdFusion Server.

In addition to the technical and product advances we've made significant changes to the way Flex 2 is packaged, priced, and deployed. The Flex framework is available free of charge through the Adobe Flex 2 Software Development Kit (SDK). The Flex 2 SDK includes the command-line compiler and documentation required to develop, compile, and deploy Flex applications that connect to any XML and SOAP web service. It is available as a separate download and allows developers to build and deploy any application (including those for commercial use) free of charge. We have also made available a limited-connection version of Flex Data Services 2 free of charge for use on a single, non-clustered server. (Of course, Flex Data Services 2 will be also be licensed commercially on a per CPU, per project, and enterprise license basis.) Together, these free offerings bring the industry's most powerful cross-platform RIA technology within reach of every developer and every project. That's huge.

A new foundation for rich Internet applications: Flash Player 9

Flash® Player, the backbone of the Flash Platform, is also evolving to provide the foundation for the Flex 2 product line and next-generation RIAs. Over the years the player, which began primarily as a client for playing animation, incrementally extended its scripting language (ActionScript) by adding support for portions of the ECMAScript standard (the same standard that drives the development of JavaScript). By the release of Flash Player 7, ActionScript implemented the vast majority of the ECMA standard. Flash Player 9 (until recently referred to as Flash Player 8.5) ships at the same time as the Flex 2 product line. Read more about it in Introducing Flash Player 9. With it we introduced ActionScript 3.0, a powerful object-oriented programming language designed for productivity and performance, and based on the next generation of the ECMAScript standard. Read more about it in ActionScript 3.0 overview .

Flash Player 8 (released in September of 2005) made great advances in the rendering engine, introducing a set of extended expressiveness capabilities (filters, advanced gradient controls, rendering performance, and so forth), and video support enhancements (higher quality codec, alpha channel support, and so forth) that are unparalleled on the web today. Flash Player 8 also greatly improved the APIs that enable a developer to communicate between applications running in the player, the browser's HTML document object model, and associated JavaScript functions, making it easier to add Flash components to existing web pages and applications.

Flash Player 9 builds on the advances in Flash Player 8 by focusing on improving script execution in the virtual machine. In fact, it includes a brand new, highly-optimized ActionScript Virtual Machine (AVM) known as AVM2 and a new version of the ActionScript programming language. AVM2 is built from the ground up to work to support the needs of RIA developers. The new virtual machine is significantly faster, supports full runtime error reporting and industry-standard debugging. It includes binary socket support, allowing developers to extend the player to work with any binary protocol. Flash player 9 will also contain AVM1, which executes ActionScript 1.0 and 2.0 code, for backward-compatibility with existing and legacy content.

With ActionScript 3.0, we have achieved more than simple compliance with the ECMAScript standard; Adobe now chairs the ECMAScript committee and helps drive its evolution. ActionScript 3.0 features a compilation mode for stronger compile-time type checking that provides the benefits of languages such as Java or C#. It supports new features to streamline data manipulation, including the E4X (ECMAScript for XML) standard, which extends the language and adds XML as a native data type allowing developers to more naturally interact with and manipulate XML. It adds regular expressions support for better text parsing and processing. It sheds some of the ad hoc event handling schemes in the old virtual machine in favor of a unified model based on the W3C DOM Events standard. And it has significantly updated APIs aimed at the application developer audience.

For a complete overview of the new capabilities, check out the articles, ActionScript 3.0 overview and Introducing Flash Player 9.

The Adobe Flex 2 product line

The Flex product line gives application developers a powerful client runtime, programming model, development environment, and data services. It supports common design patterns, works with existing development and deployment technologies, and provides the benefits of a modern, standards-based language. The product line contains the following distinct technologies:

  • Adobe Flex framework and Flex 2 SDK
  • Adobe Flex Charting 2
  • Adobe Flex Builder 2
  • Adobe Flex Data Services 2

Flex framework

At the core of Flex 2 is the Flex framework, which is distributed for free as part of the Flex Software Development Kit (SDK). The framework builds on the foundation provided by Flash Player 9 and ActionScript 3.0 by providing a rich class library that embodies best practices for building successful RIAs. The Flex framework provides a rich set of extensible user interface components, a flexible model for controlling layout and user interaction, and a robust infrastructure for accessing data from remote services and binding it to the data objects and user interface controls.

The Flex component library includes over 100 components and containers, ranging from simple widgets like buttons and a color picker, to advanced controls like a data grid, accordion pane, and rich text editor. Developers can construct an application's user interface using these built-in components, subclass them to modify their behavior, or create entirely new components using the component API. Like other modern user interface development environments, Flex enables developers to take advantage of predefined interactions, such as draggable columns on a data grid, or hook into some well-defined events to define application-specific behaviors.

Developers lay out Flex components with MXML, an XML-based language that provides a declarative approach to controlling an application's visual appearance. Using MXML, developers can position components, specify constraints to enable a more "liquid" user interface, and use View States and Transitions to control how the application should respond to different user actions and application events. To customize the look and feel of an application, developers can set the built-in style properties through Cascading Style Sheets (CSS) or attach custom visual assets using built-in support for 9-slice.

Flex applications access data and services through a set of built-in service components. Developers can access XML data through HTTP and web services, as well as take advantage of additional services provided by Flex Data Services, including connectivity to remote Java objects, publish/subscribe messaging, and the new Flex Data Services. To facilitate working with data, Flex provides a rich data-binding infrastructure that automatically updates the user interface when data is returned, allowing applications to remain responsive even when waiting for results from the server.

Take a more in-depth look at enhancements in the product information about Flex framework.

Flex Charting 2

Adobe provides a flexible charting extension to Flex. Developers can easily add these data visualization components to any application. The Charting components are dynamically rendered on the client, making it easy to add drill-down, rollover, and other interactivity that makes your charts even more insightful than before. The Charting components have a fully exposed API that allows you to easily customize the components or create your own.

The charts package is fully integrated into the framework's general infrastructure for effects, styles, data binding, and drag and drop, and will work seamlessly with Flex Data Services (see below).

Flex Builder 2

Flex Builder 2 is a brand new tool defined from the ground up to provide developers with an incredibly productive environment for building rich Internet applications. It provides a state-of-the-art coding and debugging environment; features intuitive layout, styling, and interaction design tools; and promotes good, maintainable coding practices. Built on the Eclipse platform, Flex Builder presents both a familiar and truly extensible set of capabilities.

Developers using Flex Builder 2 will find tools that significantly accelerate their coding efforts. "Content Assist" capabilities enable code hinting for both MXML and ActionScript. Code navigation capabilities help you find the definition of a method or class quickly. An option to incrementally compile your application automatically on every file save speeds up the edit-run-debug cycle. Built-in error reporting makes finding and fixing errors easy. The context-sensitive help system makes it fast to find documentation. The advanced debugging perspective makes debugging Flash applications efficient and enables those who already use Eclipse to debug client and server code in a single IDE. Lastly, its integration with source control systems (such as CVS) and build tools (such as Ant) make team development easy.

Developers will find flexible visual support for laying out controls by absolute position, relative position, or predefined layout rules (such as vertical, tile, and so forth). Visual design support for "View States" is an innovative feature that enables you, with very few lines of code, to visually define how the appearance of a control or the entire application changes in response to some event. The CSS editor accelerates the creation of new style sheets, or integration with existing ones, and the ability to display edited styles and skins in the Design view as you code, shortening the update and test cycle. It also supports seamless round tripping between hand-edited code and code generated by the Design view, so that a team of developers can work together without code conflicts.

Developers using Flex Builder 2 can import multimedia and video produced in Flash Professional 8. Our goal is to give teams of interactive designers, videographers, multimedia producers, and application developers the best of all worlds. They can use Flash Professional to create the most precise, powerful, and expressive interactive content and media. They can use Flex Builder to create the most immersive application experiences. Over time, we intend to strengthen the workflow among these tools, making working together even easier and more efficient.

Flex Builder 2 will be available as an independent product with a standard tool pricing model. Read more about Flex Builder 2.

Flex Data Services 2

In Flex 1.0 we provided a set of runtime services to aid the transport of data and integration with existing server infrastructures. Flex Data Services 2 takes a massive step forward by providing a set of message-based services and supporting capabilities that join your enterprise architecture and information presentation by transparently synchronizing data between tiers. This significantly increases developer productivity by reducing time spent writing, debugging, and maintaining the often-error-prone code required to move data among the client, application, and database tiers.

Flex Data Services also exposes a robust messaging infrastructure for moving data between the client and server, and allows developers to easily create applications that efficiently leverage real-time data, occasionally available services, and very large data sets. The Data Services capabilities seamlessly extend the framework, allowing developers to realize the benefits with very little overhead. For example, the client-side messaging architecture provides an elegant model for event and data queuing and synchronization, allowing organizations to produce occasionally connected applications with minimal effort.

In addition, Flex Data Services enhances our efficient, binary protocol for data transport (AMF), and continues to support RPC-style interaction with web services and Java objects. For more details, check out the Flex 2 product information and the Data services and integration section in the Flex Developer Center.

The Flash Platform: Expanding the richness of rich Internet applications

Flash has always been at the forefront of user experiences, thanks to the capabilities of the technology and the incredibly creative community that pushes the envelope of traditional design practices. The resulting advances in user experience design are often immediately available to Flex developers. Take, for example, the recent explosion in the use of Flash Player for online audio and video.

Flash Player is the most widely deployed audio and video player on the market. It allows video elements to be seamlessly integrated into the surrounding content or application, such as triggering video cue point events in your RIA. It supports progressive download of short-form video files and integrates with Flash Media Server 2.0 for streaming more interactive, higher quality, long-form video.

The community has leveraged these capabilities to create rich Internet applications that break down the silos that exist today between applications and rich media. Instead of having their applications launch a separate media player—thereby creating a discontinuous experience—Flex developers can truly integrate video into their application's user interface and workflow. For example, training videos can navigate and highlight particular user interface elements of your application and your application can cue specific portions of a video to play based on a user's actions. Flash video and audio streams can be incorporated into Flex 2 applications by using Flash Media Server 2 or Flash Video Streaming Service, a hosted service for delivering large-scale Flash Video deployments developed by leading CDN (Content Delivery Network) partners in conjunction with Adobe.

Lastly, now that the merger of Adobe and Macromedia is complete, you can expect to see interesting new innovations to work their way into the Flex product line. As we look forward, some of the areas we are investigating include support for real-time collaboration, improved designer-developer workflow, and greater support for offline applications and documents. Look for more on our future direction on Adobe Labs in the coming months.

Thank you from the Flex team

By now you've seen a high-level overview of the Flex 2 product line, including Flash Player 9, the Flex framework, Flex Builder, and Flex Data Services. Our goal for the Flex 2 product line is to provide the developer community with a great platform for delivering the best application experiences to their customers.

We made the prerelease versions of Flex 2 available so the developer community at large would have an opportunity to have an early look at our direction, and to provide feedback. On behalf of the Flex product teams, thank you for visiting Adobe Labs, downloading our beta, and getting involved. If you're a ColdFusion developer, be sure to download the additional ColdFusion 7.0.2, which contains connectivity to Flex.

Visit the Flex Developer Center and flex.org to stay up to date and discuss your ideas and questions with other developers on the Adobe Flex Forums. To help make your initial experience with Flex 2 a productive one, we have provided a series of sample applications, tutorials, and other resources you can walk though before venturing "off road."

When you've seen what's possible with Flex 2, please tell us what you think. We look forward to collaborating with you to build a set of products that enables you to change the face of Internet applications.

Resources for Flex 2

About the author

David Wadhwani is the vice president of product development for Adobe Flex. Prior to joining Macromedia in 2002 he was the founder and vice president of product development at iHarvest Corporation. While at iHarvest, David led the development and deployment of a web-based knowledge management and collaboration system before selling it to Interwoven, Inc. He also spent approximately four years at Oracle in the early 1990s where he was part of the core team that conceived, designed, and implemented Oracle's first business analytics software package. David is a graduate of Brown University and a member of The Indus Entrepreneurs, and has advised a number of software startups over the last five years.