Design mode summary

xiaoxiao2021-03-06  91

Create mode: Abstract Factory: Create multiple sets of class hierarchy Builder: Gradually build a complex object Factory method: Define a method of creating an object, let the subclass determine instantiated class prototype: Create an object by copying prototype Singleton : Ensure that the system only has an example and provides a global access point structure mode: Adapter: Interface Bridge: Separation interface and implementation, make multiple implementations of transparent replacement Composite: combine objects into tree structure to represent the overall and Partial hierarchical, unified single and combined object Decorator: Dynamic to the object Add responsibility for the subsystem: Provide a simplified interface for the subsystem FLYWEIGHT: Share a lot of fine-grained object proxy: Control the access behavior pattern of objects: CHAIN ​​of Responsibility : Multiple objects have the opportunity to process request command: encapsulate the request to encapreter: Use the textual method to explain the sentence intencerator: Sequential access to the interaction of the aggregated internal details Mediator: Package a series of objects interact, reducing the coupling MEMENTO: In the case where the package is not damaged, the object is captured and saved outside of the object, so that the status OBServer: defines a pair of dependencies, all objects depend on its objects when the object state changes. Automatically update State: Allow an object to change behavior when changing, the object seems to modify its class Strategy: Package a series of mutually replaced algorithms template method: Define an operational algorithm skeleton, delay some steps to Sub-class Visitor: Indicates an operation of each element in the object structure

转载请注明原文地址:https://www.9cbs.com/read-107007.html

New Post(0)