Design Pattern Classification (a model, structural model, behavioral patterns)

1, create a schema

 Recall that the social division of labor is getting smaller, natural as well as in software design, the use of objects and object creation has become separated from the inevitable trend. Create problems because the object will consume a lot of system resources, so the individual to create an object of study in order to be able to create objects efficiently is to create a schema to be discussed

Simple factory pattern (Simple Factory)
factory method model (Factory Method)
Abstract Factory (Abstract Factory)
Creator mode (Builder)
prototype patterns (the Prototype)
singletons (the Singleton)

2, the structure schema

 After solving the problems created objects, dependencies between objects and objects composed of developers it has become the focus of people's attention, because the structure of how to design objects, inheritance and dependencies will affect the follow-up maintenance program, code robustness, and other coupling

Appearance mode / Facade mode (the Facade Facade Mode)
adapter mode (Adapter)
agent mode (Proxy)
decorative pattern (the Decorator)
bridge mode / bridge mode (Bridge)
combined mode (Composite)
Flyweight (the Flyweight)

3, behavioral patterns

 After creating structural problems and the object of the objects have been resolved, leaving the object's behavior problems, if the behavior of objects of good design, then the behavior of the object will be clearer and collaboration between them will improve efficiency

Template Method pattern (Template Method)
observer mode (Observer)
state mode (State)
Strategy Mode (Strategy)
duty chain (Chain of Responsibility)
command mode (Command)
visitor pattern (Visitor)
mediator mode (Mediator)
memo mode (Memento)
iterator (the iterator)
interpretation mode (interpreter)

Published 297 original articles · won praise 6 · views 8528

Guess you like

Origin blog.csdn.net/qq_23929673/article/details/103608714