Creation Mode
1. Singleton, Singleton mode: ensures that a class has only one instance and provides a global access point to it.
2. Abstract Factory: provides an interface for creating a series of related or mutually dependent objects without specifying their specific classes.
3. Factory method: defines an interface used to create objects, so that the subclass decides which class to instantiate. Factory method delays the instantiation of a class to the subclass.
4. Builder: separates the construction of a complex object from its representation, so that different representations can be created during the same construction process.
5. prototype: Use a prototype instance to specify the type of the object to be created, and copy the prototype to create a new object.
Behavior mode
6. iterator: provides a method to access each element of an aggregate object sequentially without exposing the internal representation of the object.
7. Observer, observer mode: defines the one-to-many dependency between objects. When the status of an object changes, all objects dependent on it are automatically updated by notification.
8. template method: definesAlgorithmAnd some steps are delayed to the subclass. The templatemethod allows the subclass to redefine certain steps of the Algorithm without changing the structure of an algorithm.
9. Command: encapsulate a request as an object, so that you can parameterize the customer with different requests, queue requests and record request logs, and supports unrecoverable operations.
10. State: allows an object to change its behavior when its internal state changes. The object seems to have changed its class.
11. Strategy: defines a series of algorithms, encapsulates them one by one, and enables them to replace each other. This mode allows algorithms to be independent of customers who use them.
12. chain of responsibility, responsibility chain mode: Enables multiple objects to process requests, so as to avoid coupling between the request sender and receiver.
13. mediator: uses an intermediary object to encapsulate object interaction of some columns.
14. Visitor, visitor mode: indicates an operation that acts on each element in an object structure. It allows you to define new operations that act on this element without changing the element classes.
15. interpreter, interpreter mode: a language is defined to define a representation of its grammar and an interpreter. This interpreter uses this representation to explain sentences in the language.
16. Memento: capture the internal state of an object without interrupting the object, and save the state outside the object.
Structure Mode
17. composite, combination mode: combines objects into a tree structure to represent the relationship between parts of the whole. Composite makes the use of a single object and a combination object consistent.
18. facade. Appearance mode: provides a consistent interface for a group of interfaces in the subsystem. Fa? Ade provides a high-level interface, which makes the subsystem easier to use.
19. Proxy: provides a proxy for other objects to control access to this object.
20. adapter and adapter mode: This mode converts a class of interfaces into another interface that the customer wants. The adapter mode makes those classes unable to work together due to interface incompatibility.
21. decrator: the decorator mode dynamically adds some additional responsibilities to an object. In terms of the added functions, the decorator mode is more flexible than the subclass generation mode.
22. Bridge: separates the abstract part from its implementation part so that they can change independently.
23. flyweight: Metadata-based mode