Chapter 3
Design Patterns
We all know the value of design experience. How many times you had design dejá-vu—that feeling that you’ve solved a problem before but not knowing exactly where or how? If you could remember the details of the previous problem and how you solved it, then you could reuse the experience instead of rediscovering it.
The Gang-of-Four, Design Patterns - Elements of Reusable Object-Oriented Software
A design pattern describes a commonly-recurring structure of communicating components that solve a general design problem in a particular context [GHJV95].
In this chapter we present eight design patterns: Whole-Part, Master-Slave, Proxy, Command Processor, View Handler, Forwarder-Receiver, Client-Dispatcher-Server and Publisher-Subscriber.
3.1 Introduction
Design patterns are medium-scale patterns. They are smaller in scale than architectural patterns, but are at a higher level than the programming language-specific idioms. The application of a design pattern has no effect on the fundamental structure of a software system, but may have a strong influence on the architecture of a subsystem.
We group design patterns into categories of related patterns, in the same way as we did for architectural patterns:
- Structural Decomposition. This category includes patterns that support a suitable decomposition of subsystems and complex components into cooperating parts. The Whole-Part pattern (225) is the most general pattern we are aware of in this category. It has wide ...
Get Pattern-Oriented Software Architecture, Volume 1, A System of Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.