It’s once again time for me to create another SOA glossary — mapping a customer’s existing terminology to the way specific terms are used in the SOA community. Always fun. We (once again) have two competing definitions for “contract”, though:
- A contract is service interface + policy (+ address)
- A contract is the mutual agreement between two parties (usually a specific consumer and provider)
I lean towards the second definition (it’s the one e.g. used by ZapThink and in the OASIS SOA Reference Model), but I wonder how widespread this understanding is? (The only occurrence of the first one I can find right now is, in fact, in a comment by Anne Thomas Manes here on this very blog; IIRC, it’s also the one used in her book).
What do you think?
The first definition is by far the most widely used one in software engineering, but in my opinion it is based on the ill-chosen usage of the term by Bertrand Meyer when he introduced “Design by Contract”. A contract in that context is formed by obligations and benefits, but since the third important property of a legal contract — the mutual agreement — is missing, I’d consider this a weak analogy that can be pretty misleading. So to answer your question: While the first definition is common, I support your opinion that the second one is more appropriate, especially in a large distributed system like an SOA without fixed associations between specific consumers and providers.