Service- and Component-based Development: Using Select Perspective™ and UML
by Hedley Apperly, Ralph Hofman, Steve Latchem, Barry Maybank, Barry McGibbon, David Piper, Chris Simons
Design by contract
Design by contract [Meyer] describes the responsibilities of the calling and called components, by describing the preconditions, post-conditions, and parameters for each service invocation. This is the most important aspect of documenting a component, so that it can be easily used and reused.
Preconditions express the constraints for a service to operate properly, and the post-conditions express the state of the component after the service has been invoked successfully. This then defines the benefits and obligations for the supplier and consumer of the service: the contract. If the obligations are not fulfiled, then the contract has been broken.
During design of a component or service, the preconditions and post-conditions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access