what are design patterns? The description provides a guideline or template that can be applied to a frequently occurring design problem
To illustrate how useful a common vocabulary can be, imagine that you are on a team of civil engineers who are building a highway. If the terms cloverleaf, suspension bridge, or tunnel are used, you’ll probably be able to picture in your mind a solution to a common transportation problem. These three terms are examples of names for design patterns. In this case the problem domain is civil engineering.
To summarize, all design patterns have the following characteristics …
- A name
- A description of the problem being addressed
- A description of the solution
- An evaluation of the pattern’s consequences (i.e. its trade-offs)
As software developers and architects, why should we care about design patterns?
- Design patterns provide a common vocabulary, and therefore facilitate communication.
- Design patterns provide templates or guidelines for solving common design problems.
- Design patterns help us understand the consequences of our design decisions.
If we study design patterns and understand when they should be applied, we can build better products, and in the process bring benefit to our respective companies, our projects, our teams, and ourselves as well. Rather than reinventing the wheel, we can learn from our predecessors, and that’s the key to building better software!