[
Lists Home |
Date Index |
Thread Index
]
XML is well known for its separation of data (XML) from presentation of
the data (XSLT), i.e., "one data but many views of the data".
I would like to conjecture a similar design pattern for XML messages -
the separation of an XML message from the consumption of the message,
i.e., "one XML message but many consumers of the message".
For example:
|--------|
| |
|------> | Logger |
| | |
|------------| | |--------|
| | |
| Intinerary | -----| |--------------|
| | | | |
|------------| |------> | Travel agent |
| |
|--------------|
Here the Itinerary message is being consumed by 2 different applications
- a Travel agent (which responds with an XML message containing flights)
and a Logger application which logs all itineraries (and no response is
generated). There are 2 important things to note:
1. The same message (data) is usable by a variety of applications. This
is possible because the Itinerary message is just data, it is not tied
to any application. That is, there are no "action tags".
2. The application which consumes the data decides on the purpose of the
data.
I like the clean separation of the XML message from the processing of
the message. Isn't this exactly analogous to what we strive for with
XML and XSLT? To my mind it is, so I again assert that it is best to
leave out "action tags" in an XML message. Comments? /Roger
P.S. Great discussion!
|