O'Reilly logo

Making Software by Greg Wilson, Andy Oram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 22. The Evidence for Design Patterns

Walter Tichy

Design patterns are reusable solutions for design problems. They became popular in 1995 with a famous book by Erich Gamma et al. [Gamma et al. 1995]. Before design patterns were introduced, programmers had only a few general design principles to guide them when structuring software. These principles included the information hiding principle, which says to equip software modules with change-invariant interfaces. This principle assures that the insides of a module can be changed while keeping the interface the same, and therefore none of the software using the module needs to be updated. The principle was formulated by Parnas [Parnas 1972] in response to the observation that software changes frequently.

Design patterns go further than general principles: they suggest solutions for concrete design problems. In that sense, design patterns are to design what algorithms are to programming. Both algorithms and design patterns provide solutions for concrete problems. For instance, Quicksort provides a solution for sorting, whereas the Observer pattern is a solution for sending updates to interested software components. Textbook algorithms usually are not executable, because they are formulated in pseudo-language. The programmer must map them into the target programming language and make other adjustments. Similarly, design patterns are not finished designs. Instead, they describe a general software structure or interaction between ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required