| By Coach Wei | Article Rating: |
|
| September 19, 2006 03:45 PM EDT | Reads: |
40,292 |
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. (See Figure 1) 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. 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. (See Figure 2) 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. 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.
Application Logic Development
RIA solutions enable
a wide range of options for application logic development. In typical
HTML applications, most of the logic has to be on the server side. In
typical desktop applications, most of the logic resides on the desktop.
RIAs offer significant flexibility so developers put the logic either
on the client side or server side. They can also adjust the location -
ranging from very limited logic on the client side all the way to
almost 100% logic on the client side, as shown in Figure 3.
The flexibility in partitioning application logic brings significant benefits. Some applications are best suited to having all their logic centralized on the server side while other applications require that the logic run on a local desktop. Traditionally, developers have to make tradeoffs depending on whether they choose to build the application as Web application or a desktop application, and bear with the problems associated with that particular choice. RIAs combine the best of both worlds, enabling developers to meet different application requirements without making costly tradeoffs.
In contrast to UI development, the choice of a particular RIA approach - Java, AJAX, .NET, or Flash - has a direct impact on and creates significant differences in application logic development. Choosing a scripting-based solution requires that the logic be written as scripts, which limits the amount and scope of logic that can be developed and maintained cost-effectively. An OOP-based RIA solution gives maximum flexibility to logic development and maintenance, but requires a higher-level skill set than scripting.
There's a code sample of logic development using Laszlo in Listing 1.
By contrast, OOP-based approaches use an object-oriented true programming language for the application logic development and typically enforce separation between the logic and the UI markup. For example, Nexaweb uses standard Java for the application logic called mco. Nexaweb also enforces a clear separation between the UI and logic, preventing the mixing of the UI with the logic in the same document for better application maintenance. (See Figure 4) Nexaweb separates the UI from the application logic:
<xal>
<mco:declarations xmlns:mco="http://nexaweb.com/mco">
<mco:mco id="myMco" src="com.nexaweb.test.MyTestMco"/>
</mco:declarations>
<dialog title="Login Dialog">
<boxLayout orientation="vertical" pack="start" align="start"/>
<label text="Username:"/>
<textField height="25" text="enter username here..." width="200"/>
<label text="Password:" />
<textField height="25" text="enter password here..." width="200"/>
<panel height="25" width="100"/>
<button height="25" text="Button" width="100" onCommand="mco://myMco.handleOnCommand()"/>
</dialog>
</xal>
Published September 19, 2006 Reads 40,292
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Coach Wei
Coach Wei is the Founder and Chairman of Nexaweb (www.nexaweb.com), developers of the leading software platform for building and deploying Web 2.0 and AJAX applications. Previously, he played a key role at EMC Corporation in the development of a new generation of storage network management software. Wei has his master's degree from MIT, holds several patents, is the author of several technology publications including JDJ, Web 2.0 Journal, and AJAXWorld Magazine, and is an industry advocate for the proliferation of open standards.
![]() |
Joe 09/20/06 04:43:35 AM EDT | |||
I would like to point to a new framework I found for doing RIA the object oriented way but still resulting in standard DHTML/AJAX. Check this live sample here http://samples.visualwebgui.com/mainform.wgx and find more info here http://www.visualwebgui.com. |
||||
![]() |
n d 09/19/06 04:00:34 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? |
||||
![]() |
j j 09/19/06 03:34:31 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? |
||||
![]() |
j j 09/19/06 03:28:22 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? |
||||
![]() |
AJAX SUX 08/27/06 03:39:39 AM EDT | |||
AJAX SUX. In fact, there is now a world wide movement to get RID OF JAVASCRIPT. Javascript is on its way out. People are already annoyed with it and are boycotting sites and advertisers that use Javascript and they are preferring sites that use normal standard HTML. any websites that continute to use Javascript are dumped and nobody visits them and those companies using gratuitous and unnecessary Javascript on their sites are blacklisted. Form buttons, form validators, anything. Any programmer using Javascript = Loser. |
||||
![]() |
Greg Holmberg 08/01/06 01:35:05 PM EDT | |||
As usual, Wei conveniently leaves off the list one of the best designed and most efficient solutions in the Java-based category: UltraLightClient from Canoo. The server-side API is almost identical to the Swing API, the network protocol is highly optimized and puts just 1/10th the data on the network as HTML, and there is a plug-in to Eclipse for GUI building. |
||||
![]() |
JDJ News Desk 07/28/06 11:02:36 AM 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? |
||||
- Kindle 2 vs Nook
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Windows 7 – Microsoft’s First Step to the Cloud
- Cloud Expo and the End of Tech Recession
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Reality Check at the Cloud Computing Expo
- Visual Studio 2010 Is Cloud Friendly
- Fired SCO CEO Fires Back
- Kindle 2 vs Nook
- The Difference Between Web Hosting and Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- Wave on Ulitzer: Confessions of a Google Wave Fanboy
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Best Practices
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Eval JavaScript in a Global Context
- Windows 7 – Microsoft’s First Step to the Cloud
- Google Maps and ASP.NET
- Crystal Reports XI & How It Has Changed
- Converting VB6 to VB.NET, Part I
- Creating Controls for.NET Compact Framework in Visual Studio 2005
- Where Are RIA Technologies Headed in 2008?
- How to Write High-Performance C# Code
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Implementing Tab Navigation with ASP.NET 2.0
- i-Technology Photo Exclusive: Bill Gates & Steve Jobs In "Nerds"
- .NET Archives: Getting Reacquainted with the Father of C#
- i-Technology Viewpoint: "SOA Sucks"
- Programmatically Posting Data to ASP .NET Web Applications






























