Enhace, Extend, Transform

Web 2.0 Magazine

Subscribe to Web 2.0 Magazine: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Web 2.0 Magazine: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Web 2.0 Authors: Glenda Sims, Serafima Alex, Xenia von Wedel, Harry Trott, Larry Alton

Related Topics: RIA Developer's Journal, Web 2.0 Magazine, Java EE Journal, XML Magazine, SOA & WOA Magazine, Java Developer Magazine

RIA & Ajax: Article

Java or .NET? XML Rich-Client AJAX Technology Brings Zero-Install Rich Client To Java

Which platform to use Java or .NET? Developers ask this question all the time

Take the form below as an example. To create this form takes about 70 lines of C# code using Visual Studio .NET, but only 17 lines of XML code using an XML-based rich-client technology. On top of that, XML code is much easier to read, and can be processed and understood by someone with HTML skills. Both C# code and Java Swing code require intimate knowledge of Object-Oriented programming. The skill set requirement is considerably higher.

Here is the Visual Studio.NET C# code needed to create the form previously shown in Figure 1:

this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();

this.tabControl1.Location = new System.Drawing.Point(8, 8);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(248, 168);
this.tabControl1.TabIndex = 0;

this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(240, 142);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "tabPage1";

this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(288, 230);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "tabPage2";

this.button1.Location = new System.Drawing.Point(152, 104);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "OK";

this.textBox1.Location = new System.Drawing.Point(8, 48);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(216, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Text = " ";

this.label1.Location = new System.Drawing.Point(8, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(224, 23);
this.label1.TabIndex = 2;
this.label1.Text = "Please Enter Your Card Number Below:";
this.label1.Click += new System.EventHandler(this.label1_Click);

this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(264, 187);

this.Name = "Form1";
this.Text = "Sample Form";

  • XML Rich Client Technology Enables Richer, Thinner, Faster Applications - Enterprise Internet Applications built using XML rich-client technology can be normal J2EE Web applications, but send XML to the client side instead of HTML. However, because of XML rich-client technology, they are richer, faster, and consume up to 90% less bandwidth. No client installation is required. These applications can run instantly on different browsers and PDA devices with the same functionality as Windows desktop applications, with user interface elements like multiple windows, menu bars, toolbars, and hierarchical trees.

    For example, an enterprise management "dashboard" application built with XML rich-client technology can use sliding tabs to display tabular data as well as rich graphics and interactive charts, all updated in real-time via server push without the clunky "click-refresh" associated with normal HTML applications.

    Applications of this nature are usually built using .NET or Win32 and require heavy download/installation. Using XML rich-client technology, they are lightweight, zero-install Web applications with lower bandwidth consumption and better performance.

  • XML Rich Client Technology Seamlessly Extends J2EE - With XML rich-client technology, developers can still use JSP, tag libraries, servlet, struts, and other approaches for server-side presentation, EJB for server-side business logic, and any persistency layer for data storage. The application is deployed as a normal WAR/EAR file and managed as a normal Web application.
Combining XML rich-client technology with J2EE provides the following benefits compared to .NET:
  • Enterprise-scale rich-client capability and complex workflow, scalable for large data sets and high transaction rates such as hundreds of messages per second.
  • Zero-install capability with deployment/management advantages similar to HTML. While .NET applications can only be deployed to Windows XP desktops, XML rich client technology applications can be deployed hassle-free to over 95% of all desktops with any 4.0+ browser.
  • XML rich-client technology working in concert with J2EE gives Web applications the "out-of-box" capability to seamlessly enable server push, reliable messaging, pub/sub, broadcasting and guaranteed order delivery. Built-in compression, incremental update, and distributed state management minimize network traffic and increase performance.
Using XML rich-client technology, companies can develop enterprise Internet applications that match desktop quality with higher performance, and still enjoy a J2EE server infrastructure: centrally managed and deployed, automatically updated, bandwidth and network efficient, with enterprise-level J2EE security, scaling, and broad industry support.

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 (29)

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.