10.1 Design patterns in brief
When engineers and architects decide to build a bridge, a tower, or a building, they follow certain principles to ensure structural integrity. There are various possible designs for bridges (suspension and cantilever, for example), but if the engineer doesn’t use one of the standard designs, and doesn’t have a brilliant new design, it is likely the bridge they design will collapse.
Design patterns are an attempt to apply this same formal definition for correctly designed structures to software engineering. There are many different design patterns for solving different general problems. Design patterns are applied to solve a common problem faced by developers in some specific situation. What’s central to a pattern is that it is reused. This means it may be used in a unique context perhaps not obvious from the way the pattern is often described. One clever solution is a good idea. Two similar solutions might be a coincidence...