Sharing structured data

XML Magazine

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

XML Authors: Jnan Dash, Jayaram Krishnaswamy, Jason Bloomberg, Chris Pollach, Peter Silva

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

This article originally appeard in Java Developer's Journal on October 10, 2005

Which platform to use Java or .NET? Developers ask this question all the time. Java has been widely adopted because of its overwhelming benefits on the server side, but Java has less to offer on the client side. .NET has made inroads into the enterprise by leveraging its stronger rich-client capabilities. An alternative solution for enterprise-scale Internet application development is the emerging XML-based rich-client technology.

.NET Erosion from the Client Side
There are good reasons why Java is the platform of choice for server-side computing. J2EE is an open standards-based platform that enables open integration. Java enjoys broad industry support, including vendors like IBM, Sun, and Oracle, as well as upstarts like Nexaweb and Sonic Software. J2EE is cross-platform, giving customers the freedom to deploy in different environments. It has proven enterprise strength. By comparison, .NET has obvious limitations. It is limited to Windows deployment only; it's a single-vendor solution, and lacks industry support from other vendors to meet enterprise requirements.

On the other hand, .NET has stronger client-side capabilities than Java. Java AWT is based on an architecture that offers limited out-of-box capabilities. Java Swing offers better out-of-box functionality, but it's complex and difficult to use. It is possible to develop Java applications with a rich look-and-feel using AWT or Swing, but complexity and developer skills requirements are high. By contrast, the barriers to developing strong .NET client applications are lower. Your typical corporate developer can easily write sophisticated VB.NET desktop applications with a professional look-and-feel.

Watch Coach Wei, author of this article, live on SYS-CON.TV

Another option is to develop thin-client applications using HTML. HTML applications are "zero-install" thin-client applications, while both Java and .NET client apps have a heavy client-side footprint and require a significant download. Besides solving network bandwidth issues, "zero-install" translates directly into lower maintenance and support costs. The skill set requirements and complexity of HTML is much lower than either .NET and Java. Unfortunately, HTML isn't suitable for handling the level of complexity, scale, and time-sensitivity required by enterprise programs. For applications with non-linear workflow, complex integration, large data sets, or time criticality, Java or .NET rich clients have been the only viable options.

Most business applications are user-oriented. Client-side issues such as look-and-feel, richness, and performance directly impact business user productivity. As a result, client-side choice can influence server-side architecture decisions. Because Java doesn't have a compelling solution on the client side, many applications are written with .NET. Eventually this could lead to a greater adoption of .NET for easier integration and management, eventually eroding J2EE's market share.

XML Rich Client
Now there's an alternative. XML rich client-technology serves rich-client applications on-demand by using XML from J2EE or Service Oriented Architecture (SOA) environments. Using XML rich-client technology, J2EE can deliver enterprise Java applications with higher performance than .NET - not only visually and functionally richer, but easier to deploy and maintain, with a thinner footprint, faster performance, greater scalability, and lower complexity.

Sample XML-Based Rich Client Technology Code
With XML rich-client technology, Web developers can build and deploy Web applications with the same richness and performance as the best Java Swing or .NET client apps without losing the "zero-install" and "universal delivery" advantages of HTML. The difference is that an XML-based rich-client application would send out XML to the client side, which is processed by the software's client, instead of HTML being processed by a browser, as in a normal Web application.

Figure 1 shows a sample form. The code behind it is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<dialog height="212" title="Sample Form" width="275">
   <layoutmanager layout="nulllayout"/>
   <tabbox borderstyle="null" height="168" width="248" x="8" y="8">
    <tab text="tabPage1">
     <layoutmanager layout="nulllayout"/>
     <label height="23" text="Please Enter Your Card Number Below:"
     width="224" x="6" y="24"/>
     <textbox height="20" text="" width="216" x="8" y="48"/>
     <button height="25" text="OK" width="60" x="170" y="100"/>
    <tab text="tabPage2"/>

Figure 2 shows a sample chart. In normal Web apps, such charts are generated as static GIF images that are sent to the browser for display. With XML-based rich-client technology, XML can be sent directly to the client:

<?xml version="1.0" encoding="UTF-8"?>
<dialog title="Auto-resizable Chart Example" bordercolor="blue" width="534"
   <layoutmanager layout="borderlayout"/>
   <chart layoutpos="center">
    <series points="200,100,400,300,200,200,100,400,300,200" stroke="red"
    <series points="300,200,100,200,400,300,200,100,200,400"     stroke="blue"
    <labelaxis fgcolor="red"/>

The Benefits of XML Rich Client Technology

  • The Future is XML - The rapid adoption of XML for server-side computing makes XML a natural candidate for client-side computing. Even Microsoft has made a commitment to this trend. The next-generation Windows, Longhorn, will support the use of XML for Windows desktop applications.
  • XML Rich-Client Technology Significantly Lowers Application Complexity and Skill Set Requirements - One benefit of XML rich-client technology is that it enables enterprise-class Internet applications while lowering development/maintenance complexity. XML rich-client technology uses the power of XML, which is more efficient and extensible than procedural programming languages like Java, C#, C++, or JavaScript. Code created in XML is simpler, takes up fewer lines, and is easier to read and process. Someone with HTML skills can easily understand the code, while C# code and Java Swing code require intimate knowledge of Object-Oriented programming.

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.