RIA Technologies

Today, there are several technology choices developers have when they start building RIAs. Among the more popular choices are HTML-based options, such as Ajax (Asynchronous Javascript and XML), as well as plug-in-based options such as Adobe Flash, Adobe Flex, and Laszlo which all run in Flash Player. A new option from Microsoft seems to be on the horizon because the Microsoft channels are abuzz with talk of XAML and the Windows Presentation Foundation.

There are four different run times on which the current RIA landscape is based. Those are Ajax, which is supported by Dojo, OpenRico, Backbase and the Yahoo ToolKit; Flash Player, which is used by Flex and Laszlo; Windows Presentation Foundation (WPF), which is Microsoft's not yet released platform; and Java, which is used by AWT, Swing, and Eclipse RCP. It seems that both the Java and WPF solutions are taking aim at desktop applications, rather than RIAs although they could be used for RIAs as well.

Asynchronous Javascript and XML (Ajax)

One of the easier choices to understand (but not necessarily to implement) is Ajax, which is an acronym for Asynchronous Javascript and XML. Ajax is based on tools already familiar to web developers: HTML, DHTML, and JavaScript. The fundamental idea behind Ajax is to use JavaScript to update the page without reloading it. A JavaScript program running in the browser can insert new data into the page or change structure by manipulating the HTML DOM without reloading a new page. Updates may involve new data that is loaded from the server in the background (using XML or other formats) or be in response to a user interaction, such as a click or hover.

The earliest forms used Java applets for remote communication. As browser technologies developed, other means, such as the use of IFrames, replaced the applets. In recent years, XMLHttpRequest was introduced into JavaScript, providing a means to facilitate data transfers without the need for a new page request, applet, or IFrame.

In addition to the benefit of Ajax using elements already familiar to many web application developers, Ajax requires no external plug-in to run. It works purely on the browser's capability to use JavaScript and DHTML. However, the reliance on JavaScript poses one of the new liabilities of Ajax: it fails to work if the user has JavaScript disabled in the browser.

Another issue with Ajax is that it has varying levels of support for DHTML and JavaScript in different browsers on different platforms. For applications in which the target audience can be controlled (such as intranet applications), Ajax can be written to support a single browser on a particular platform (many businesses today have standardized browsers and operating systems). However, when applications are opened to larger audiences (such as extranet and Internet applications), Ajax applications need to be tested (and often modified) to ensure that they run identically in all browsers on all operating systems.

Ajax is not likely to go away any time soon, and each day more and more high-profile Ajax applications are launched with great acclaim (such as Google Maps).

It should be noted that Ajax is not actually a programming model in and of itself. It is really a collection of various JavaScript libraries. Some of these libraries include reusable components designed to make common tasks easier. Although Ajax lacks a centralized vendor, integrating these libraries introduces dependencies on third parties, which assumes a certain amount of risk.


One of the key competitive run times in the RIA space is Adobe's Flash Platform. The Flash Platform is currently the key competitor to Ajax for RIAs. Originally written as a plug-in to run animations, Flash Player has evolved over the years, with each new version adding new capabilities while still maintaining a very small footprint. Over the past decade, Flash Player has gained near ubiquity, with some version of it installed in more than 97 percent of all web browsers on the Internet. Since 2002, Macromedia (now part of Adobe) began focusing on Flash as more than an animation tool. And with the Flash 6 release, Macromedia began to provide more capabilities for building applications. Macromedia found that with the combination of the ubiquity of the player and the power available from its scripting language (ActionScript), developers could build full browser-based applications and get around the limitations of HTML.

By targeting Flash Player, developers could also break away from browser and platform incompatibilities. One of the many nice features of Flash Player is that content and applications developed for any particular version of Flash Player will (usually) run on any platform/browser that supported that version of the player. With very few exceptions, it remains true today.

Historically, the biggest drawback of building applications for the Flash Player was the authoring environment, which was clearly built as an animation tool for users creating interactive content. Many developers who wanted to build RIAs for Flash Player were thwarted by the unfamiliarity of the tools. This, coupled with the scant materials available in 2002 for learning to use Flash as an application platform, kept many serious developers from successfully building Flash applications.

Although Flash Player remains an excellent platform for RIAs, the introduction of solutions such as Laszlo and Flex have greatly simplified the development process and reduced the number of RIAs developed directly in Flash Studio.


Sensing the need for more developer-friendly tools for building RIAs, Laszlo Systems developed a language and compiler that enabled developers to work with familiar languages from which their compiler could create applications to run in Flash Player.

Just like Ajax, Laszlo applications are built in JavaScript and XML, but they run in Flash Player, so they make available the rich-user experiences of a desktop client along with the deployment benefits of traditional web applications. Flash Player also gives the capability to run on virtually every web browser regardless of the operating system. Unlike Ajax applications, Laszlo uses a compiler that takes the XML and JavaScript and then publishes a Flash SWF file from them. This allows developers freedom from varying levels of JavaScript support across different platforms.

Another way Laszlo is similar to Ajax is that data access is usually done by loading in server-side XML. With the more recent introduction of the OpenLaszlo servlet, Laszlo applications can now also consume Simple Object Access Protocol (SOAP)-based Web Services. In late 2004, the Laszlo platform became open source and therefore free for development and deployment.

At this point, the biggest drawback to Laszlo is one of its early strengthsthat it relies on JavaScript. JavaScript is loosely typed; in its current incarnation, it does not support many fundamental object-oriented concepts (such as true classes), which the development community is embracing. A second drawback is that it blocks developers from directly interacting with the rich set of Flash Player APIs, instead requiring you to use APIs that have been exposed through the tags and their corresponding JavaScript API.

As an open-source tool, Laszlo is likely to gain favor among the set of developers who currently tie themselves to the open-source "LAMP" family of products (Linux, Apache, MySQL, and PHP).

The next generation of Laszlo's server is said to have the capability to use the same XML and JavaScript for producing either Flash or Ajax applications. If this proves to be true, the Laszlo toolset could indeed be very valuable.


For many of the same reasons why Laszlo was developed, Macromedia set forth on its own project to create a more developer-friendly approach for building applications for Flash Player. In 2004, Macromedia released Flex 1.0 (followed by Flex 1.5 and Flex 2.0 in 2005 and 2006, respectively). Architecturally, Flex applications are similar to Ajax applications, in that both are capable of dynamic updates to the user interface, as well as the ability to send and load data in the background.

The Flex 2 product line provides the next generation of developer tools and services that enable developers everywhere to build and deploy RIAs on the Flash platform.

The Flex 2 product line consists of several pieces:

  • ActionScript 3.0 A powerful object-oriented programming language that pushes forward the capabilities of the Flash platform. ActionScript 3.0 is designed to create a language ideally suited for rapidly building RIAs. Although earlier versions of ActionScript offered the power and flexibility required for creating engaging online experiences, ActionScript 3.0 further advances the language, improving performance and ease of development to facilitate even the most complex applications with large datasets and fully object-oriented, reusable code.

  • Flash Player 9 (FP9) Building on Flash Player 8, this next generation of Flash Player focuses on improving script execution. To facilitate this improvement, FP9 includes a brand new, highly optimized ActionScript Virtual Machine (AVM) known as AVM2. AVM2 is built from the ground up to work with ActionScript 3.0, the next generation of the language that powers Flash Player. The new virtual machine is significantly faster, and supports run-time error reporting and greatly improved debugging. Flash Player 9 will also contain AVM1, which executes ActionScript 1.0 and 2.0 code for backward-compatibility with existing and legacy content. Unlike applications built using JavaScript, Flash Player is capable of using a Just In Time (JIT) compilation process, which enables it to run faster and consume less memory.

  • Flex Framework 2 Using the foundation provided by FP9 and ActionScript 3.0, the framework adds an extensive class library to enable developers to easily use the best practices for building successful RIAs. Flex uses an XML-based language called MXML to allow developers a declarative way to manage the elements of an application. Developers can get access to Flex framework through Flex Builder or the free Flex SDK, which includes a command-line compiler and debugger, allowing developers to use any editor they prefer and still be able to access the compiler or debugger directly.

  • Flex Builder 2 A brand new tool designed from the ground up with the intention of providing developers with an environment specifically built for building RIAs. Built on top of the industry standard, open-source Eclipse project, Flex Builder 2 provides an excellent coding and debugging environment, is a rich and useful design tool, and promotes best practices in coding and application development. Another benefit of the Eclipse platform is that it provides a rich set of extensibility capabilities, so customizations can easily be written to extend the IDE to meet specific developers' needs and/or preferences.

  • Flex Data Services 2 (FDS2) Previous versions of Flex included a set of run-time services to help with data access and integration to existing server infrastructures. Flex Data Services 2 take this idea to the next level by adding to the existing tools a set of message-based services to synchronize data across all tiers of an application. This vastly increases the productivity of developers and the capabilities of RIA. Additionally, FDS2 exposes a robust messaging infrastructure, which enables real-time data streaming, the ability to implement a true server-side push, as well as publish-subscribe messaging. Another set of features available in FDS2 surrounds the capability to rapidly build and deploy occasionally connected applications, so that users can have data available to them, even if they are working without an Internet connection. These services aid in synchronizing the data the next time the user is working with an Internet connection.

Windows Presentation Foundation/XAML/Expression

Microsoft has announced they will launch a set of tools to help developers build RIAs on the Windows platform. The new system consists of the following:

  • WPF The Windows Presentation Foundation (formerly code-named Avalon). This is analogous to the Flash Player and Flex frameworks.

  • XAML Extensible Application Markup Language. The XML-based language in which you can build WPF applications. XAML is analogous to Flex's MXML language.

  • C# The programming language used to build applications for WPF. To follow the Flex 2 analogy, this operates in a similar fashion to ActionScript 3.0 for Flex Applications.

  • Microsoft Expression A professional design tool designed to work with XAML and enable interation designers to create the user interface and visual behavior for WPF applications. This is roughly analogous to Flash Studio, as a design tool for WPF applications.

  • Visual Studio Microsoft announced plans to make a future version of Visual Studio work with XAML, WinFX, C# and VB.Net.

Using these tools, Microsoft is promoting a workflow in which designers create compelling user interfaces with Expression, and then developers can implement the business and data access logic using Visual Studio.

Because these tools are not publicly available yet, it is impossible to predict the success or market penetration they will have. Microsoft publicly stated they will have support for other platforms (specifically with their WPF/E, which is an abbreviation for Windows Presentation Foundation/Everywhere), but specific information, such as how much of the WPF technologies will be available with WPF/E, has not been forthcoming. It is encouraging to see Microsoft finally promising to provide tools for platforms other than Windows, but it's too soon to see how they will live up to that promise.

Assuming that the cross platform promise is met, WPF may some day offer a very compelling platform, in that they can leverage integration with Visual Studio, which many developers already use, and they have a separate design tool specifically for designers. One potential weakness of WPF is that it is first and foremost designed for building desktop Windows applications, not browser-based ones. The idea is that users will be able to install WPF applications via the browser, but they are likely to be much larger downloads and memory footprints. Also, it is worth noting that it is likely to be a long time before WPF reaches any kind of ubiquityeven on Windowsbecause of the large download required. Though it has been promised that WPF will work in Windows XP (currently the largest install base of an OS), it's not clear when XP users can really expect it, or what they can expect from it.

Adobe Flex 2.Training from the Source
Adobe Flex 2: Training from the Source
ISBN: 032142316X
EAN: 2147483647
Year: 2006
Pages: 225

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net