1. Abstract Factory provides an interface for creating a series of related or mutually dependent objects without specifying their specific classes. This mode is used when the product object family needs to be generated.
2. The factory method defines an interface for creating objects, so that the subclass decides which class to instantiate and delays the instance of a class to its subclass. Instantiate the delayed subclass.
3. The Creator mode (builder) is separated from the construction of a responsible object, so that different representations can be created during the same construction process. It is used to create a composite object.
4. The prototype uses the prototype instance to specify the type of the ajian object and copy the prototype to create a new object. This mode is used when the instantiated class needs to change.
5. Singleton ensures that a class has only one instance and provides a global access point to it. When an object is globally unique.
6. the adapter mode converts an interface of a class to another interface that the customer wants, so that the classes that cannot work together due to interface incompatibility can work together. When the object interface is variable, the interaction capability of the object is improved.
7. The Bridge Mode separates the abstract part from its implementation part so that they can all change independently. Object implementation variable.
8. Composite combines objects into a tree structure to represent a "part-whole" hierarchy, so that the customer can use a single object and composite object with an inhibition. When the structure of an object is variable.
9. The decorator dynamically adds some additional responsibilities to an object. In this way, more flexible extensions can be obtained than subclass generation. Objects have variable responsibilities, but do not generate child classes.
10. The facade mode (facade) provides a consistent interface for a group of interfaces in the subsystem. It defines a high-level interface, making this subsystem easier to use. Provides unified interfaces for subsystems.
11. flyweight uses the sharing technology to effectively apply special effects to support a large number of fine-grained objects. When considering the object overhead.
12. Proxy mode provides a proxy for other objects to control access to this object. Use the proxy mode when you want to indirectly or access the object location.
13. The Interpreter mode (Interpreter) defines a language, a syntax expression, and an interpreter, which is used to explain sentences in the language. Grammar and interpretation of a language as variable time.
14. The template method definesAlgorithmAnd delay some steps to the subclass. This allows sub-classes to change the structure of an algorithm to redefine certain steps of the algorithm. When some steps in the algorithm are variable.
15. In order to cancel the coupling between the request sender and the tricky person, the chain of responsebility has the opportunity to process the request and link these exclusive objects into a chain, and pass the modification request along this chain until an object processes it. One response is required for all possible requests.
16. The command mode encapsulates a request as an object, so that you can use different requests to modify the parameterization of the customer, queue the request or record the request log, and supports cancelable operations. When you consider how to satisfy a request.
17. The iterator mode provides a sending sequence to access each element in an aggregate object without exposing the internal representation of the object. It is used to access an aggregated element considering how to traverse it.
18. The mediator mode uses an intermediary object to encapsulate a series of object interactions. The intermediary makes it unnecessary for objects to be explicitly referenced from each other to make them loosely coupled, the postgraduate entrance exam independently changes the interaction between them. It is used when objects are not easy to communicate directly or intermediator communication is required.
19. The observer mode (observer) defines a one-to-many dependency between objects. When the State of an object changes, all objects dependent on it are notified and automatically refreshed. This parameter is used when multiple objects are in the same column as other objects.
20. The state mode allows an object to change its behavior when its internal state changes. The object seems to have modified its class. It is used when the object state is to be maintained or the object state is variable.
21. Strategy defines a series of algorithms, encapsulates them too slowly, and allows them to replace each other, this mode makes variable changes to an algorithm independent of customers who use it. When you need to define a series of algorithms.
22. The visitor mode (visitor) indicates an operation that acts on each element in an object structure, it allows you to define new operations for these elements in the scope without modifying the classes of each element. Some operations that can act on one (Group) object, but do not modify these classes.
23. The memorandum mode (menento) captures the internal state of an object without damaging encapsulation, and saves the State outside the object, in this way, the object can be restored to the Saved state. It is used when the private information of an object is stored outside the object direction, and the information is variable, and the storage location is also variable.