logo头像
Snippet 博客主题

Design Patterns

1 Programming Patterns

A pattern is a way to describe and address by name.

2 Creational Patterns

Deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

2.1 Builder

Separate the construction of a complex object from its representation.
Same construction process can create different objects representations.

2.2 Factory

A utility class that creates an instance of a class from a family of derived classes.

2.2.1 Abstract Factory

The pattern works best when a well-designed interface is used for the base class.

2.3 Prototype

2.4 Singleton

3 Structural Patterns

3.1 1. Adapter

Convert the interface of a class into another interface

3.2 2. Bridge
3.3 3. Composite
3.3.1 4. Decorator
3.4 5. Facade
3.5 6. Flyweight
3.6 7. Proxy
3.7 Curiously Recurring Template
3.8 Interface-based Programming (IBP)
4 Behavioral Patterns
4.1 Chain of Responsibility
4.2 Command
4.3 Interpreter
4.4 Iterator
4.5 Mediator
4.6 Memento
4.7 Observer
4.8 State
4.9 Strategy
4.10 Template Method
4.11 Visitor
4.12 Model-View-Controller (MVC)