Case Studies

 

This section contains a number of simple, pedagogical case studies that illustrate the application of contracts using the CDE. Two cases are discussed: 

  1. An example that explains how contracts can be an alternative solution to the Observer design pattern. The example illustrates how contracts promote a first-class modeling of object interactions in contrast with design patterns in which such modeling is at a very low-level, thus making it difficult to understand and change. Moreover, it shows how contracts can be applied to dynamically evolve an application without performing any changes to already implemented parts. Lastly, it is discussed why, contrarily to design patterns, contracts support "black-box" reuse of components, thus promoting library-based, "dynamic" system development. 

  2. An example from a control system using Sensors.

  3. A number of additional case studies from Telecommunications and StockTrading can be found in publications. They may be a good starting point for further practising coordination contracts in the CDE.


© Copyright 2001 ATX Software SA. All rights reserved.