Design patterns
Design patterns are like templates for solving common problems in software design. They’re not finished designs you can transform directly into code but guidelines you can follow to solve problems in a variety of contexts. They’re solutions to problems that software developers have found themselves facing repeatedly.
There are three major kinds of design patterns: creational, structural, and behavioral:
- Creational patterns are about object creation mechanisms, in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design because the developer must manually create every instance using the
new
keyword and then compose complex objects themselves in ways that might not be expected. Creational design patterns solve this problem by controlling this object creation. Examples include the Singleton, Factory Method, Abstract Factory, Builder, and Prototype patterns.
...