Design patterns are becoming a de facto standard, slowly, in software development. Therefore, books that include this term in their title are eye-catching, especially if combined with contracts. Contracts are an important subject in their own right and so combining that with design patterns would seem to be a sure fired way to success.
On the positive side, the book covers the GoF design patterns with code implementation examples. The explanations are short and succinct and provide a worked code example with some useful clarification. There is an overview of design patterns in a software engineering context and with contracts. Finally there are sections covering patterns and user interfaces and software configuration management.
However, there are some notable disappointments:
- Too many areas are included with insufficient depth, the less charitable would call it 'padding'
- The code is in Eiffel, so the examples are immediately less accessible than C++ or Java
- The example code uses a dungeons and dragons game theme - maze, rooms, doors... not terribly useful
- All the code appears to be printed in the book, again the less charitable would call it padding
- The treatment of contracts is somewhat superficial, the subject could have been significantly expanded
- Passing parameters in various ways and the impact of those choices on design
- Relationship of contracts and defensive programming
- Relationship of contracts with inheritance, polymorphism and encapsulation
- Effect of applying contracts on performance
- Rules of thumb regarding when contracts are useful
- Rules of thumb regarding avoiding duplication of applying pre/post conditions to code