Web application: XML is the answer - IBM DB2

Web applications are usually built by the following three tier model. These three tiers are considered separate well-defined processes or components that run on different platforms:

  • The user interface or browser that runs on client machines
  • The application programs that include the business logic runs on Web server
  • The database management system or the back-end system that holds data

This application model has many advantages over the single or two tier model, because the application is accessed by the browser and shares the same look and feel, no matter where it is accessed from. Also, the application modularity makes it easy to modify one component without affecting others. However, a request to a Web application does not always need to originate from a human being. It also can originate from another application sharing the same model and same protocol. XML opens the door for connecting one Web application to another. Consider a Web-based traffic warning application, which gets the real-time traffic information from another Web-based application. A user subscribes to the traffic warning Web site, which processes the real-time traffic data and produces the warning result for its subscribers.

The architectural overview of such an application is shown in Figure. If this Web application is developed using the old Hypertext Markup Language (HTML) technology, the traffic warning application would get an HTML data for one of its subscribers, who commutes between San Jose and San Francisco. The traffic warning application then would process the trouble spot as represented in a particular HTML tag on a particular line number (line#) of the HTML data. This would work fine for a very fixed format. However, needless to say, that application will break with a slight change in data format, or even if a blank line is inserted in the output generated by the real traffic application. XML solves the problem; it directly represents the data. The real-time traffic data is returned as XML, which is the logical representation of the traffic data. The data representation is separate from page presentation. The fact that data is separate from presentation makes serving different types of contents to different types of client easier. The same traffic warning data can be accessed from a Web browser on your laptop as well as from a thin personal digital assistant (PDA) client on your cell phone.

Today, XML is the most common data interchange format on the Web. Any modern application can interact with an existing application through the Web services technology, which exchanges information as messages represented in XML format.

Web application XML: connecting each other

Web application XML: connecting each other

XML is so powerful and so flexible that people use it not only as a document but widely use it to:

  • Describe the meta content of the Web resources. Resource Description Framework (RDF) is such an example, which is an XML representation of resource described uniquely on Web. The popularity of semantic Web technology is fueling the growth of rich metadata being defined on Web contents.
  • Publish and interchange database contents. Sharing data between applications is a necessity. Finding a common ground and different parties agreeing to it is only possible through XML and XML schema.
  • Communicate with message format. Business-to-business (B2B) applications use XML-based messaging to communicate.

So, why use XML? Well, for simplicity, richness for data structure, and its versatility (handling of international characters). Today, database vendors support XML and hence your application can leverage the robustness and scalability of database systems while maintaining flexibility using XML data.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM DB2 Topics