Welcome!

Coach Wei

Subscribe to Coach Wei: eMailAlertsEmail Alerts
Get Coach Wei via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal, Web 2.0 Magazine, Apache Web Server Journal, SOA & WOA Magazine, Java Developer Magazine, AJAX World RIA Conference

RIA & Ajax: Article

AJAX, Java, Flash, and .NET

Enterprise Rich Internet Applications (RIAs) are the next evolution of business application development

Enterprise Rich Internet Applications (RIAs) are the next evolution of business application development. There are four different approaches to RIA development - AJAX, Java, Flash, and .NET - and many different RIA solutions available today. This article answers the following questions: What are enterprise RIAs? Which approach should you use? Which solutions are appropriate for you? And how are RIAs being adopted today?

Welcome to a New Paradigm
The Web began as an environment for content sharing and small-scale data transfer via e-mail, newsgroups, and so forth. These initial uses quickly led to more sophisticated applications particularly in the e-commerce arena. However, the Web wasn't architected with rich application services in mind. Its document-centric model has by and large thwarted developers looking to leverage the Web as a platform for enterprise-class applications.

Beginning in early 2005, popular new Web applications like Gmail, Google Maps, and Flickr awakened the entire Internet community to the possibility of a far richer Web experience. Web developers were quick to discover and leverage the technical approach that these applications used, which was first termed AJAX (for Asynchronous JavaScript and XML). The excitement around AJAX focused more attention on the wide spectrum of Rich Internet Application (RIA) development tools and the various approaches available.

Gartner calls RIAs "the next evolution of the Web." They represent the next big evolutionary step for enterprise application development. They deliver the high performance and robust functionality of desktop or client/server software combined with the universal reach, no-install deployment, and centralized management of browser-based apps. RIAs represent the next paradigm for building, deploying, and maintaining enterprise applications. The impact of RIAs on business will match that of PC desktop computing - bringing operational efficiency and productivity to a whole new level, while decreasing costs.

Enterprise RIAs versus Consumer RIAs
In general, Rich Internet Applications can be classified into two categories: enterprise RIAs and consumer RIAs. Enterprise RIAs refer to RIAs whose users are primarily business users. This includes internal enterprise IT applications as well as B2B applications. Consumer RIAs refer to RIAs whose users are primarily individual consumers, such as consumer Web sites, as well as B2C applications.

Enterprise RIA Opportunities
A growing number of Fortune 1000 companies have already adopted Enterprise RIAs or will do so in the near future. According to Gartner, "By 2010, at least 60% of new application development projects will include RIA technology, and at least 25% of those will rely primarily of RIA (0.7 probability)."

Organizations that seek competitive advantage or greater operational efficiency are increasingly exploiting RIA technology to re-architect traditional client/server applications, such as those written in Visual Basic or Java Swing. RIAs can offer all the rich features and performance benefits of these "thick client" alternatives, while eliminating the need to install and maintain a custom client on user desktops.

Enterprise RIA technology is also of great value to companies that wish to improve the performance and user experience of traditional HTML-based Web applications. RIAs can radically improve the responsiveness of browser-based applications because they enable processing to take place on the client, thus reducing network demands in comparison to HTML's inefficient "click-wait-refresh" model.

Moreover, Enterprise RIAs mesh perfectly with Service Oriented Architecture (SOA) and Web Services initiatives (see references to Dion Hinchcliffe and Dana Gardner). Their role in this model is to deliver SOA-based services to users via a wide range of devices, while at the same time reducing the cost and complexity associated with managing networks and client-side deployments. In particular, RIAs can reduce the need for development teams to create multiple interfaces to applications using disparate technologies, as is the case with client/server and HTML-based architectures today. As SOAs become the method of choice to deploy both new and existing business services, enterprises will increasingly employ RIAs to bring those services to their end users.

Approaches to RIA Development
Though it's still evolving, today's RIA marketplace is already rich in choice, and IT teams are challenged to match technology options with business goals. But while there are a variety of approaches and products available for building and deploying RIAs, they nearly all fall into one of only two basic categories:

  • Object-oriented programming (OOP) based approaches, such as Java and .NET and
  • Scripting-based approaches, including AJAX and Flash
The comparative strengths and weaknesses of the different RIA approaches center largely on the programming model and application execution environment they employ. The programming model impacts development and maintenance efforts, the availability and cost of developer skills, the availability of industry and development community support, and such. The execution environment significantly impacts not only application performance, functionality, and reliability but the deployment model as well.

Comparing RIA Approaches
In general, OOP approaches confer the advantages of strongly typed object-oriented programming such as improved code maintainability and reuse, and are better suited for enterprise-class applications. Scripting-based approaches offer the advantages of scripting and are best suited to quickly finishing simple tasks done.

Among the OOP-based approaches:

  • Java-based RIAs generally leverage a client-side Java engine. Client-side application logic (if any) is written in Java, while the UI is defined using XML. The client-side components execute inside a Java Virtual Machine (JVM) that is typically embedded in a browser.
  • .NET-based RIAs rely on a .NET virtual machine. The UI can be programmed using .NET controls or Microsoft's XAML. Client-side logic is generally programmed in C# or a similar language.

    Among scripting-based approaches:

  • AJAX-based RIAs typically employ a relatively simple browser-based JavaScript library for greater interactivity. The UI is most often defined using DHTML/JavaScript; client-side logic is also written in JavaScript. The client-side execution environment is the browser itself.
  • Flash-based RIAs run in the Flash animation engine. The UI is defined using SWF (a proprietary binary format for defining Flash-based movies) or with XML markup compiled into SWF. Client-side logic is programmed in ActionScript, a scripting language developed by Macromedia (now Adobe).
Table 1 summarizes the advantages and disadvantages of these four approaches.

RIA Solutions Today
There are many RIA solutions available today. Each of them fits into one of the approaches mentioned above. Some of the solutions come with tooling that can simplify development and maintenance. Table 2 shows a list of solutions available today.

General RIA Programming Model
Although there are many different RIA solutions based on different underlying technology platforms, the general RIA programming model is actually converging into a single common model.

Declarative UI Development
The general RIA programming model is centered on using an XML-based UI markup language to create a rich user interface. The XML-based UI markup provides a much higher level of abstraction than HTML for building rich user interfaces. XML UI frees programmers to focus on the application's core logic and explicitly complements the roles of a typical enterprise development team (see reference "XML for Client-side Computing").

Below are examples from a scripting-based approach (Laszlo Systems) as well as an OOP-based approach (Nexaweb). Both are zero-install and can run inside any popular Web browser today without any software download. On the client side, Laszlo requires a Flash engine (Flash 6 and above) while Nexaweb requires a JVM (JDK 1.1 and above).

Laszlo is a Flash-based RIA solution. It uses an XML UI markup language called "lzx" to describe the UI and uses ActionScript to code application logic. The Laszlo server will automatically compile lzx files into the Flash binary format (SWF), deliver the SWF files for rendering inside a Flash engine, and execute the application. (Figure 1) Following is an example of the Laszlo code:

<canvas height="450">
   <window x="10" y="10" width="300" height="200"
      title="my window"
      resizable="true" closeable="true">
<button x="10" y="100">Hello, World</button>
   </window>
</canvas>

By comparison, Nexaweb is a Java-based RIA product. Developers would use an XML-based UI markup to create a rich user interface and build client-side business logic by writing client-side Java objects called Managed Client Objects that are standard Java program objects. The Nexaweb client runtime dynamically renders the XML UI markup to present a rich user interface, and dynamically downloads client-side Java objects to the client side for execution in a "on-demand" fashion. (Figure 2) Here is a simple Nexaweb UI that defines a tree and a button managed by a layout manager:

<xal xmlns="http://www.openxal.org/xal">
   <window title="New Window">
   <boxLayout orientation="vertical" pack="start" align="stretch"/>
     <tree>
       <column/>
       <row expanded="true">
         <cell text="Tree Item 1"/>
         <row>
           <cell text="Sub Tree Item 1"/>
         </row>
         <row>
           <cell text="Sub Tree Item 2"/>
         </row>
       </row>
       <row expanded="true">
         <cell text="Tree Item 2"/>
         <row>
           <cell text="Sub Tree Item 3"/>
         </row>
       </row>
     </tree>
     <button text="OK"/>
   </window>
</xal>

As shown in these two code examples, though Nexaweb uses Java and Laszlo uses Flash, RIA UI development is conceptually identical between the two different RIA solutions.


More Stories By Coach Wei

Coach Wei is founder and CEO of Yottaa, a web performance optimization company. He is also founder and Chairman of Nexaweb, an enterprise application modernization software company. Coding, running, magic, robot, big data, speed...are among his favorite list of things (not necessarily in that order. His coding capability is really at PowerPoint level right now). Caffeine, doing something entrepreneurial and getting out of sleeping are three reasons that he gets up in the morning and gets really excited.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Jeff 06/14/06 01:52:44 PM EDT

Coach, please look more into the Flash technology from Adobe in regard to Flex and ColdFusion, Java, .Net backend. It is 100% OOP. Please do a bit more research before you write something in regard to a technology such as ActionScript/Flash and it's capabilties. IMHO Flex 2.0 will leave AJAX, a RWA (Rich Web Application) solution behind due to its abilities to run outside the browser as well as in, a characteristic of a true RIA. Good luck to you.

David Bolsover 06/14/06 05:58:19 AM EDT

A facinating article; I have worked with both web and desktop Java applications I'm presently working with Swing clients and taking advantage of some of the new work coming out of the SwingLabs projects (JDNC, Databinding etc.) - but this article has given me considerable pause for thought.

It looks like we are in for some interesting times ahead - and making the right choice of technology today will bring significant rewards for the future.

One thing is certain if Java is to maintain it's share of the marketplace, it must continue to grow and work such at that underway on JSR 295: Beans Binding and JSR 227: A Standard Data Binding & Data Access Facility for J2EE will become increasingly important.

Mark 06/09/06 01:23:25 AM EDT

I'm sure that you are going to receive hundreds of emails from people all letting you know which framework that you missed. Ajaxian does a framework review periodically and I think that they are well over 100 different frameworks...

I do think that you neglected to mention some of the next generation frameworks that are emerging to address the hodgepodge of technologies that you have to manage and integrate in the enterprise RIA space.

Probably one of the latest example is going to be the Google Web Toolkit that was recently announced. Basically this is a framework for AJAX based RIA's where everything is developed in Java (Servlets) on the server which emit javascript/DHTML/AJAX to the browser.

For internal development, the GWT is an excellent option, but if you are looking for an open source solution, you should check out Echo2. (http://www.nextapp.com/platform/echo2/echo/). Essentially the same thing, interfaces can be built on the server in Java and rendered into the browser with AJAX, etc. I believe the UI can be tweeked with CSS as well. Check out the demos.

Finally, for a commercial framework, the Tibco product from IBM is a very powerful framework. UI development is done using an AJAX IDE, written using the framework of course. There are several javascript components that speak SOAP so you can quickly participate in an SOA. Very heavy on the browser because significant heavy lifting is done using javascript in the browser.

Unfortunately I'm unsure of any .Net frameworks... I believe that Atlas is supposed to be the GWT / Echo2 alternative for .Net AJAX developement...

Thanks for a great article!
Mark

AJAXWorld News Desk 06/08/06 03:52:33 PM EDT

Enterprise Rich Internet Applications (RIAs) are the next evolution of business application development. There are four different approaches to RIA development - AJAX, Java, Flash, and .NET - and many different RIA solutions available today. This article answers the following questions: What are enterprise RIAs? Which approach should you use? Which solutions are appropriate for you? And how are RIAs being adopted today?