Research, training, consultancy and software to reduce IT costs | |||||
Minimal integration 4: XML is beautifulXML is a way of structuring data that works very well with integration. XML is simpler than many people imagine. Extensible markup language (XML) is often used to build interfaces. This week I will answer the questions: what is XML, why is it so useful for integration, what are the benefits, and what are the drawbacks? Next week I will describe how to keep XML very simple. XML is a markup language. It is a way of adding extra bits of information to your data so that you can understand what the data means. So, instead of passing 018716, which is meaningless, you can pass <productNumber>018716</productNumber>, which makes it easier to understand what the data means. As well as marking up the data, XML allows you to group data together into structures. So you could code an item on an order like this: <OrderItem> <productNumber>018716</productNumber> <quantity>2</quantity> </OrderItem> The XML is shown spaced out on separate lines to make it easy to read. It would mean the same if it was all one long string. You can build up more complicated structures, with nesting and with repeating groups: <Order> <customerName>Mr J Smith</customerName> <OrderItemList> <OrderItem> <productNumber>018716</productNumber> <quantity>2</quantity> </OrderItem> <OrderItem> <productNumber>907232</productNumber> <quantity>1</quantity> </OrderItem> </OrderItemList> </Order> To remove dependencies between systems, interfaces should pass all the information that is required to complete the job in a single instance of the interface. This can be termed a logical unit of integration (LUI). XML supports this beautifully. It allows a LUI to be coded as a single message that can be sent from one system to another. XML solves some of the technical problems of sending data between different computers. XML provides comprehensive facilities for sending special characters in the message, and dealing with different character sets. Unlike some standards, there are no problems with sending data with € symbols, quote characters, or line breaks using XML. XML is very well supported by integration tools. So, to recap, the benefits of XML are:
The drawbacks of XML are:
Usually larger messages are a reasonable trade-off for the advantages of XML. Where network bandwidth is sufficient, or messages are small, it is not a problem. XML compresses well because it is all character data, so where data volumes are a problem data compression can be used. Next week I will explain how to keep XML very simple, so that it is always easy to understand. Later I will describe how to program with XML so that it is easy and very fast. Next: Minimal integration 5: keep XML simpleSubscription |
Latest newsletter: |
||||
Copyright © 2005-2015 Minimal IT Ltd. All rights reserved. Minimal IT: research, training, consultancy and software to reduce IT costs.
|