Schema & Semantics
[In reference to this]
I used the following example in a workshop today. Assume you do work for a bank. The bank has, of course, multiple departments and business divisions and we look at two of them for this:
The first department is corporate loans. They create an XML Schema to exchange customer information about between the main branch and their satellite branches. The customer they are looking at is of course the companies they lend money to. The schema only covers the base customer information (name, adress, primary contacts, etc.). They are the first kid on the block to define such a Schema.
"Fine! This Schema fits our need just well to exchange all base information about our customers with our branches, as well" says the financial collections division, which is indeed an independently operating business that serves its mother company's departments but also collects money for other customers. Of course, and for proper separation of financials, they don't care much whether the customer is "internal" or external.
Note that the customer term means two different things here. Not obvious?
A customer of corporate loans doesn't meet two consecutive payment deadlines. So, the corporate loans department hands over their customer data as a SOAP wrapped document to the "EDI mailbox" (transport doesn't matter) of the financial collections business where it is queued for processing. Of course, at the same time, the usual swapping of customer data happens between the branches of the financial collections business and get queued for processing in that inbound queue.
Now, the customer in the sense of corporate loans is a debtor for financial collections and corporate finance itself is a customer in the sense of financial collections. Now we have two documents with the same namespace but entirely different business semantics stuck in the same queue. What to do?
You may say: Silly design! I say: Unnecessary and pointless limitation of design. When financial collections adopted the XML Schema they were supposed to assign a different namespace, because they associate radically different semantics with "customer". Had they done that, they could dispatch by semantics and schema identity; now, they need to provide different endpoints and make sure that everybody in the software development organisazion is aware that these seemingly same things are indeed very different things.
That'd truly be silly, wouldn't it?
[Executive summary: Those who only look at wire formats and are obsessed with loose coupling shall look at some more complex and real-world scenarios once in a while] [Author's note: The "customer" is an illustrative example to carry my point, but there are other, typically much simpler schemas, where such problems are even more likely to occur in the wild]
10:33:42 PM
|