RIA Development Framework


What Does it Take to Build the Best RIA?


With the proliferation of Rich Interactive Application (RIA) platform choices out there, you no longer have to take a one-size-fits-all approach to developing your next RIA application. Knowing the strengths (and weaknesses) of each platform can help you to decide the best RIA for your next application.


RIA Frameworks Options


Before you can choose a RIA framework you need to know the available options. In this article we will be focusing on the three big leaders in the RIA framework space: Microsoft® Silverlight™, Adobe Flash / Flex / Adobe Integrated Runtime (AIR), and JavaFX. Microsoft Silverlight 1.0 and Adobe Flex/AIR are both available as production releases, while Microsoft Silverlight 2.0 (Beta), and JavaFX (Beta) are available as developmental releases. Silverlight 2.0 Beta also comes with the option of a "go-live" license for early adopters.

Silverlight is Microsoft's lightweight, cross-browser, cross-platform solution for delivering RIAs using a subset of the .NET Framework base class libraries included directly in the Silverlight runtime. Silverlight employs Extensible Application Markup Language (XAML), the declarative XML-based language found in the Windows® Presentation Foundation (WPF), to define visual elements, vector graphics, effects, animation sequences, data objects, and data interaction in the user interface. More complex business logic for Silverlight components is maintained separately from the user interface definition and, in Silverlight 2.0, can be written with managed code using a variety of .NET languages or JavaScript. Silverlight 1.0 only supports JavaScript.

Adobe's Flash platform contains three components for building RIAs: Flash, Flex, and the Adobe Integrated Runtime (AIR) . Flash is a presentation technology well known for its vector image and animation support, and allows Flash developers to create interactive user experiences using ActionScript. Flex is a development framework for building RIAs using an xml-based declarative language known as MXML in conjunction with ActionScript, which provides a cleaner separation of UI and logic than traditional Flash applications. Flex solutions do, however, play in the Flash player.

AIR is a cross-platform runtime from Adobe that allows developers to create RIAs for the desktop using HTML, JavaScript, Flash, or Flex. In other words, AIR itself is not an RIA framework but rather an RIA deployment technology that runs Flash, Flex, and HTML applications without a browser. It is similar in concept to Microsoft's ClickOnce deployment technology for Windows-based applications, though AIR runs on both Windows and Mac-based systems.

JavaFX is a family of scripting technologies built on top of the Java Platform for developing RIAs. Currently, JavaFX consists of two products: JavaFX Script and JavaFX Mobile. JavaFX Script is a non-xml based declarative language that simplifies the syntax for building visual interfaces that normally require a great deal of Swing code. JavaFX Script is ultimately compiled down to Java byte code, so it runs on existing Java virtual machines. JavaFX Mobile is an operating system for mobile devices designed around deploying RIAs on personal electronics.


Development Considerations


Before you can get a RIA in front of people you have to build it, so a major consideration in choosing any RIA technology is the toolset available to support development.

Microsoft has long been known for building exceptional development tools for its product lines, and Silverlight certainly continues the trend. You have the option of building Silverlight applications in Visual Studio®, which is geared more toward developers, or Expression® Studio, which is geared more towards designers. Each offers a XAML editor that allows you to build complex user interfaces, but Expression Studio offers designers a more complete venue for creating animations and applying visual effects to elements using a drag and drop interface. Visual Studio, on the other hand, offers all of the advanced development and debugging tools Microsoft developers have come to expect.

Another major developmental benefit to Silverlight 2.0 is support for .NET managed code for writing application logic, giving you access to a high performance, feature rich core framework that supports object oriented programming concepts like inheritance and polymorphism, and advanced language features like generics and partial classes. Silverlight 2.0 operations written in managed code can realize execution speeds more than 1000 times faster than comparable code written in unmanaged JavaScript. Check out the Silverlight 2.0 Chess application that pits .NET code vs. JavaScript code, and pay special attention to the Node per second performance used to calculate moves. Managed code also comes in a variety of languages, allowing Silverlight developers to work with C#, VB, IronPython, and IronRuby. With the possibility of more languages to come, Silverlight should appeal to a wide variety of developers with different backgrounds.

Adobe provides three different paths for developers creating RIAs based on their existing familiarity with various languages and Adobe products. Those most comfortable with HTML and JavaScript can develop RIAs directly within Aptana or the Dreamweaver CS3 Web development IDEs using the Adobe AIR SDK. Flash developers can create RIAs from within Flash after downloading an update for Flash CS3, though integrated support is scheduled to be built-in for a future release. As a presentation technology, Flash is well suited for building visually compelling content but not necessarily full-blown applications, which is where Flex steps in to fill the gap. Flex offers better support for code separation and application development than Flash, though it still relies on ActionScript for any application logic. ActionScript is an ECMAScript compliant language similar to JavaScript that supports basic OOP support. Flex Builder 3 offers Flex developers an Eclipse-Based IDE for building RIAs using the Flex 3 SDK, as well as a drag and drop interface for creating MXML GUIs.

JavaFX developmental support is fairly sparse, primarily consisting of the OpenJFX plug-in for NetBeans, which provides basic support for JavaFX script project creation and compilation. NetBeans is currently the only supported IDE for JavaFX. Two third-party applications make up the backbone of JavaFX visual support. JavaFXPad is a text editor that allows you to write JavaFX script and see the visual output in a preview window, but does not offer any drag-and-drop support for visual elements. And perhaps the most advanced graphical tool for JavaFX is JFXBuilder, a Web start application from ReportMill software that provides a drag-and-drop interface for building JavaFX GUIs. JavaFX script itself is a non-xml based declarative language that looks like a mix of Java and CSS.


Deployment Considerations


Building a RIA is just one part of the process, another part is getting it in front of people and making sure it performs adequately.

Microsoft Silverlight and Adobe Flash are both browser-based plug-ins with similar deployment scenarios. When a user visits a page with a Silverlight or Flash component, and the user does not have the appropriate plug-in installed, the page displays a message in the area where the component normally renders to inform the user they need to download the appropriate plug-in. From there, the user can navigate to the Microsoft or Adobe site and follow instructions to download the Silverlight or Flash plug-in.

Adobe AIR applications, however, are packaged as .AIR files and downloaded, not embedded in a Web page. Users without AIR installed on their system will inevitably get a "What program do you want to use to run this file?" prompt when they try to run the file, so AIR deployments will require more instruction to ensure users know how to get AIR applications running.

JavaFX script ultimately compiles down to Java byte code, so it runs on the same Java Virtual Machine as standard Java applets and does not require a specific JavaFX plug-in. As long as the system has a Java Virtual Machine (JVM) it can run JavaFX. Mac OS includes a JVM, so there are no additional downloads to run JavaFX on Mac. On Windows systems, both Firefox and Internet Explorer® display a popup message informing the user that the page is trying to run a Java applet without a JVM installed. Firefox then offers a plug-in to help install the JVM, whereas Internet Explorer redirects to a page with instructions for downloading and installing the JVM manually.

For reference, the file sizes of the various RIA technologies are included below. People with broadband connections should not be taken aback by the download size, but dialup users may find wait times for some of the technologies a bit lengthy. In general, a 56k dialup user can expect to download 1 Mb every three and a half minutes.


Performance Considerations


Being graphically intense in nature, RIA frameworks need to be optimized for graphical performance to ensure a smooth visual experience to viewers. Performance testing requires a benchmark test that performs a similar operation using various platforms in order to compare results, and fortunately Bubblemark.com has built out just such a benchmark using a variety of RIA technologies.

To test each RIA technology, the benchmarking application creates a series of animated balls that bounce around the screen. Performance is determined by the frames per second (FPS) at which the balls are drawn by each RIA technology. Following are the statistics from my Windows Vista®-based machine in Internet Explorer 7.0:

One of the first things to note in the results is the difference between the Adobe Flash and the Adobe Flash (Optimized) results. The optimized version of the Flash benchmark uses a bitmap caching technique to avoid reloading the bubble image, which is why the times for the optimized code do not decrease as drastically as the number of balls on the screen increases. In a live application it is unlikely that you can realize such performance gains because you probably won't be reloading the same image to such an extent.

Also, the AIR benchmark was written for an alpha release of AIR (originally codenamed Apollo) that is no longer supported, so I could not get the benchmark numbers for my machine. In reading others results, however, AIR's benchmark appears to resemble that of Flash. Bubblemark.com should have an updated version of the AIR benchmark in due time, where you can give it a test drive all your own.

Most of the results postings I've run across thus far show that Silverlight has higher performance benchmarks than Flash (the non-optimized version), and that JavaFX has the lowest benchmark performance of the three. Of course, you can point your browser at Bubblemark.com and try out the various technologies on your own machine and see how the results compare.




Microsoft Silverlight and the Adobe Flash platform are certainly the more refined contenders in the RIA technology space, offering designers and developers the tools they need to build gripping interactive content and end users a simple installation experience. JavaFX is a relatively new technology that will appeal to Java developers wanting to simplify Swing development, but it currently lacks many of the development and graphical design tools that accelerate building RIAs.

AIR is also an innovative technology for cross-platform desktop deployments, but similar technologies like Mozilla's Prism project may render it a bit less compelling. Prism's goal is to bring the Web to the desktop without the browser, and that would presumably include Silverlight, Adobe Flash, and JavaFX.

Silverlight has proven that it can outperform other RIA contenders, and has the potential to prevail as the leader in development tools and language support, making it simple for existing C# and VB developers to ease into Silverlight development. Open source developers familiar with Python and Ruby may also opt for Silverlight as compared to switching over to ActionScript. And since Silverlight is effectively a subset of the Windows Presentation Foundation (WPF), it opens the possibility for desktop developers to apply their skill set towards Web applications with relatively ease. As such, Silverlight is likely to gain popularity with developers, which means it will end up in front of more and more users.


Ready to Start?

Tell Us About Your Project
Step 1 of 2


Email Address:

Go to next step

Guaranteed No Obligation Response
Within 12 Business Hours