This chapter covered much of the considerations a developer should keep in mind when writing applications, particularly Web services-based applications, that use XML documents. Once these issues and considerations are understood, then a developer can make informed decisions about not only how to design and implement these XML-based applications, but if the applications should even be based on XML. In a sense, the developer is encouraged to ask this question first: "Should this application be based on XML?"
Once the developer decides that XML is appropriate for the application, then the next task is for the developer to design a sound and balanced architecture. Such an architecture should rely on XML only for what XML is good at. That is, the architecture should use XML for open, inter-application communication, configuration descriptions, information sharing, and especially for accessing domains for which public XML schemas exist. At the same time, XML may not be the appropriate solution of choice when application interfaces are not exposed publicly or for exchanging information between components that should be communicating in a tightly coupled manner.
The chapter also considered the factors a developer must weigh when deciding where and how to perform XML processing. Should XML processing be limited to the interaction layer of a Web service as a pre- or post-processing stage of the business logic, or should the business logic itself be expressed in terms of XML processing? The chapter further helped clarify when it makes sense to implement an object-centric processing model or a document-centric processing model.
These decisions determine the developer's choice among the different XML-processing APIs and implementations. Furthermore, the chapter described the performance trade-offs among these different processing techniques and compared performance with functionality and ease of use. It indicated situations where and why one technique might be superior to another and helped delineate the rationale for these choices.