Design Patterns Summary
Wikipedia introduces software design patterns this way:
A software design pattern describes a reusable solution to a commonly needed behavior in software. A design pattern is not a rigid structure to be copied directly into source code. Rather, it is a description of and a template for solving a particular type of problem that can be used in many different contexts.
From this definition, the key point is that a design pattern helps solve problems that appear repeatedly in software engineering. Its goal is not to make code look more complicated. Its goal is to reduce duplicated decisions, isolate change, and keep the design understandable.
Before applying design patterns to a real system, we need to understand what each pattern is trying to solve. In this series, I will first introduce common design patterns, including their propose, tradeoffs, pros and cons. After that, I will use our system module as a case study to explain why some patterns fit our problem, why some should be delayed, and why some should be avoided.