Design patterns are a means to communicate, identify, and remember solutions to common problems.
Each pattern names, explains, and evaluates a solution to a common problem. Each design pattern has four essential elements:
It is not possible to do a formal
big-O analysis of different patterns as it is with algorithms, because patterns leave too much unspecified.
However, it is possible to make general choices for what trade-offs do exist and which patterns are more suitable for which circumstances.