hot info

Advantages of XML Networking

on Selasa, 16 Juni 2009

Advantages of XML Networking
XML and HTTP are a great combination: XML brings full internationalization, transparency, and extensibility; HTTP brings compatibility with the Web infrastructure and a high level of hardware and software support. Combining XML and HTTP makes it possible to have stateless, lightweight, decentralized, and distributed computing, the same way that HTML and HTTP made it possible to build a stateless, lightweight, decentralized, and distributed document base.

5.1.1. Internationalization
Many of the basic Internet protocols date back to the days when the Internet and its predecessor were a phenomenon primarily of the English-speaking parts of North America. International support for non-English characters and different writing directions is often either unavailable or tacked on.

XML, on the other hand, was designed from the ground up for full internationalization (I18N). Because XML not only allows but also requires full Unicode support [UNICODE], an XML document can appear in any combination of languages. For example, a single document might have an Urdu element name, a Japanese attribute name, and an Arabic attribute value.

5.1.2. Transparency
The advantage of transparency applies as much to XML networking as to other areas of XML use. Because XML is plaintext, it is easy to test and debug applications that use it. This advantage becomes important for networking because bits on a wire can be particularly difficult to analyze. For a detailed discussion, see Section 7.1.2.

5.1.3. Extensibility
Extensibility has long been an important part of Internet and pre-Internet networking protocols and formats. For example, implementers often add new features by using a distinctive reserved prefix, such as "x-".[3] Typically, applications that do not understand the extensions simply ignore them.

[3] This usage will be familiar to many readers from the MIME (Multimedia Internet Mail Extensions) types, such as "video/x-msdownload," and e-mail headers [RFC 822], such as "X-Mailer."

This kind of extensibility is much simpler with high-level text-based protocols, such as HyperText Transfer Protocol [HTTP], than with low-level binary protocols using fixed-length fields, such as the Transmission Control Protocol [TCP] or the Internet Protocol [IP]. Even there, though, the protocols are designed to allow a certain amount of extensibility: Both the IP and TCP have room for new option types to be defined in the future.

The Internet culture of easy extensibility can be traced back in a large part to John Postel's 1981 Robustness Principle, included in RFC 793 [TCP], Section 2.10: "TCP implementations will follow a general principle of robustness: be conservative in what you do, be liberal in what you accept from others." People quickly extended this principle to other areas of Internet work and often emphasized the second part"be liberal in what you accept from others"over the first. In the 1990s, the idea of extensibility jumped from Internet protocols to Web formats: The Hypertext Markup Language (HTML) required Web browsers to ignore any markup they did not understand rather than only specially flagged markup. This approach led to major headaches for Web designers and became ammunition for both sides during the browser wars of the 1990s, but it also allowed experimentation and innovation, moving HTML from a simple specification for sharing research papers in 1990 to the rich visual medium that caught the world's attention and enabled global online communication by 1995.

Ironically, despite the fact that the X in XML stands for extensible, XML itself (Section 1.2) deliberately violates Postel's robustness principle in its definition of the term fatal error:

After encountering a fatal error, the processor MAY continue processing the data to search for further errors and MAY report such errors to the application. In order to support correction of errors, the processor MAY make unprocessed data from the document (with intermingled character data and markup) available to the application. Once a fatal error is detected, however, the processor MUST NOT continue normal processing (i.e., it MUST NOT continue to pass character data and information about the document's logical structure to the application in the normal way).

In other words, an XML parser is not allowed to try to recover from, say, an omitted end tag and continue normally: It has to be conservative rather than liberal in what it accepts. In fact, XML is extensible, but its extensibility comes at a higher level.

The design of XML makes it easy to add new element and attribute types to any format, as in HTML, but the XML Namespaces specification [NAMESPACES] goes further by making it possible to avoid naming collisions between extensions from different sources. The ability to add new fields and complex structures to protocols without breaking existing software is one of XML networking's greatest strengths, even if it does come to Postel's principle by an indirect route.

5.1.4. Compatibility
XML networking provides compatibility in two ways.

XML itself ensures that information is compatible with any application, operating system, or hardware: There are no byte-order issues, line-end problems, or any of the other small snags that can create big bugs and portability headaches.

HTTP, the most popular transport in XML networking, ensures that XML-based network protocols are compatible with existing Web hardware and software, including firewalls, which typically allow HTTP traffic through with no extra configuration required.

Only the end pointsthe computers sending and receiving XML networking messagesrequire any special software. Everything elsefirewalls, routers, switches, caches, multiplexers, and all the other bells and whistles of the Internetwill simply work. (Note that many people consider the firewall compatibility to be a security flaw, as discussed in Section 5.2.2).

0 komentar:

Posting Komentar