XML: Leading the March to Web Services

The concept of Web services wasn't so much a good idea that people backed with new technology, but the logical, inevitable result of the creation of a universal file format. Find out why XML is the genesis of just about everything there is to love about future Web-based business and commerce.

by A. Russell Jones, Executive Editor

eb services are getting a lot of attention lately, but it's worth noting that nothing about Web services would have been possible without the rapid evolution of the underlying enabling technology, XML—an evolution that led directly and inevitably to Web services.

It's amazing that the simple ideas behind XML—tagging content with names and arranging it hierarchically—have led to such rapid and resounding change in the risk-averse business community. And Web services are only one facet of XML's evolution.
XML is a revolution in data processing—not because it's a more efficient way to store content—but because it was the first technology that could adequately address the intimidating requirements of complex data. XML embodies several ideas that, up to now, were lacking or difficult to achieve in other data storage implementations:

  • information and its relationship to other information is dynamic; therefore you must easily be able to update not only the data content but also the data relationships. XML is excellent at managing relationships among constantly-changing data.
  • information is often irregular or hierarchical—much useful information relies either on its parent or child relationship with other information, or has no easily-defined relationship to any other part of an information store. XML handles both irregular and hierarchical data with ease.
  • meta-information is needed to explain not only the data type, but also the context and (at its best) the meaning of information in the data store. Meta-information is intrinsic to the XML format.
These advantages drove the rapid adoption of XML, which in turn paved a direct path to the looming potential of Web services. As we enter what will undoubtedly be a watershed year for Web services adoption, the signposts along the path to its creation are noteworthy—both historically and as a guide to future change that will arise from the evolution of XML.

The big advantages of XML documents are that the syntax and formatting rules are very simple, that XML is text-based, and that it is an accepted standard. But it was the ability for disparate systems and programs to read a common, universal file format that provided the first major step in the evolution of Web services.
Step 1: Creation of a Universal File Format
Using a very simple text-based markup mechanism, XML lets programs determine what the data is and how individual data items relate to each other. It's such a simple idea that even humans can read XML with few problems. You can take almost any information store and see how you might improve it using XML. For example, most people need to keep lists of contact names and addresses. But such lists tend to grow quickly in complexity, from simple flat lists into intricate hierarchies that will accommodate grouping of contacts by organization, product, location, or any other higher-level organizational category.

Before XML, programmers who wanted to create hierarchical information had two realistic choices: Create a proprietary file format or use a relational database. Fortunately for every computer user, the days of proprietary text file formats are just about over. Relational databases are powerful, but they are usually expensive and difficult to distribute. And they are simply overkill for many small applications that need database-like searching and sorting capabilities.

Before XML, contact information might have been stored in a comma-delimited text file similar to this (I've included the field names to make the data marginally readable, even though many data file formats do not include that information):

--CATEGORIES--
"CategoryID","CategoryName","CategoryParentID"
1,"My Company",0
2,"My Department",1
3,"Customers",0
… more categories
--CONTACTS--
"ContactID, Lastname","Firstname","Email","Date",CategoryID
1, "Doe","John","jdoe@mycompany.com",11/02/2001",1
2, "Someone","Bob","bsomeone@mycompany.com","11/02/2001",2
3, "Someoneelse","Bob","belse@mycompany.com","11/02/2001",2
4, "Doe","Jane","jndoe@mycompany.com","12/01/2000",1
5, "Jones","Fred",fjones@someplace.com","02/02/2002",3
... more contacts
Looking at the file format, it's difficult to tell exactly where or how contacts would appear in a list. In contrast, the XML representation looks wordy, but it's very easy to see that the contacts are arranged in categories containing contacts, that there are two top-level categories, and that the category named "My Company" contains a sub-category named "My Department."
<contacts>
     <categories>
          <category id="1" name="My Company">
               <contact id="1" lastname="Doe" firstname="John"
                    email="jdoe@mycompany.com" date="11/02/2001" />
               <contact id="4" lastname="Doe" firstname="Jane" 
                    email="jndoe@mycompany.com" date="12/01/2000" />
               <category id="2" name="My Department">
                    <contact id="2" lastname="Someone" firstname="Bob"
                         email="bsomeone@mycompany.com" 
		            date="11/02/2001" />
                 <contact id="3" lastname="Someoneelse" firstname="Bob"
                         email="belse@mycompany.com" 
				 date="11/02/2001" />
          </category>
     </category>
     <category id="3" name="Customers">
	      <contact id="5" lastname="Jones" firstname="Fred" 
                    email="fjones@someplace.com" date="02/02/2002" />
          </category>
     </categories>
</contacts>
When XML emerged, large companies and open source groups quickly invested in building robust XML parsers. Because the format rules are extremely simple, XML parsers are not only fairly fast, but any XML parser can read any XML document that conforms to the rules (is "well-formed"). Thus, for the first time in computing history, a program or individual can create a hierarchical well-formed document with completely customized meta-information markup, and another program—even one running on a different operating system and built with a different programming language—can read the tags and content from that document using any XML parser—without even knowing in advance what the file contains. Although that capability is useful in many situations, it's absolutely critical on the Web—and in particular, to Web services—where companies cannot control the system choices of their information sources, business partners, and customers.

The big advantages of XML documents are that the syntax and formatting rules are very simple, that XML is text-based, and that it is an accepted standard. But it was the ability for disparate systems and programs to read a common, universal file format that provided the first major step in the evolution of Web services.

  The Need for Data Types and Schema

In this Article
Introduction Step 3: Achieving Firewall Transparency
Step 2: The Need for Data Types and Schema The Final Step: Invoking Remote Components Using SOAP
 





FEATURE SOFTWARE:
dtSearch Web
Add power searching to your web site.
Buy Now!

Encrypt It
Encrypt and Decrypt Data, Passwords and Files within your application.
Buy Now!

Standards Organizations and Web Service Coalitions

Key Platforms

Pure-Play Web Services Vendors

Web Service Technologies or Components

From Sun.com

For Further Reading

Discussion Groups
Java Web Services
.NET Web Services

Back to the Special Report

Java Zone

2001 Special Report: Judging Java

TALK BACK
Do you agree that the current focus on Web services is merely a short-term phenomenon, and that Web services will eventually become part of the standard network "plumbing" that everyone uses but few people really need to understand? Talk about it in the Java Web Services discussion group.


Sponsored Links

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map
Jupiterweb networks

internet.comearthweb.comDevx.comClickZ

Search Jupiterweb:

Jupitermedia Corporation has four divisions:
JupiterWeb, JupiterResearch, JupiterEvents, and JupiterImages

Copyright 2004 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Jupitermedia Corporate Info | Newsletters | Tech Jobs | E-mail Offers

Copyright Information/Privacy Statement