Design patterns are typical solutions to common problems in object-oriented design. They are like pre-made blueprints that can use to solve a recurring design problem in the code. There are 23 patterns according to "the GoF book". They can be categorized into three categories.
- Creational patterns provide object creation mechanisms that increase flexibility and reuse of existing code.
- Structural patterns explain how to assemble objects and classes into larger structures, while keeping these structures flexible and efficient.
- Behavioral patterns take care of effective communication and the assignment of responsibilities between objects.