Chapter 4 XML Processing
163
4.3.8 Design Recommendation Summary
When you design an XML based application, specifically one that is a Web service,
you must make certain decisions concerning the processing of the content of incom
ing XML documents. Essentially, you decide the how, where, and what of the pro
cessing: You decide the technology to use for this process, where to perform the
processing, and the form of the content of the processing.
In summary, keep in mind the following recommendations:
E
When designing application specific schemas, promote reuse, modularization,
and extensibility, and leverage existing vertical and horizontal schemas.
E
When implementing a pure object centric processing model, keep XML on the
boundary of your system as much as possible that is, in the Web service in
teraction layer closest to the service endpoint, or, for more classical applica
tions, in the presentation layer. Map document content to domain specific
objects as soon as possible.
E
When implementing a document centric processing model, consider using the
flexible mapping technique. This technique allows the different components of
your application to handle XML in a way that is most appropriate for each of
them.
E
Strongly consider validation at system entry points of your processing
model specifically, validation of input documents where the source is not
trusted.
E
When consuming or producing documents, as much as possible express your
documents in terms of abstract
Source
and
Result
objects that are independent
from the actual XML processing API you are using.
E
Consider a meet in the middle mapping design strategy when you want to
decouple the application data model from the external schema that you want to
support.
E
Abstract XML processing from the business logic processing using the XML
document editor design strategy. This promotes separation of skills and inde
pendence from the actual API used.
New Page 1