Creating a model abstract factory - do not know the purpose of the person's purpose, the subclass is implemented, but the interface is unified, decided by the parameter value, which is the same as the same build-in-factor (Fatory Method) - Let instantiate delay to subclass prototype Prototype Copy prototype Create a new object single Singleton - Prevents the class is reconstructed or repeated instance ============ behavioral mode duties chain: Handle multiple requests And keep the sending and receiving coupling relationship Command: package a request into a list object, parameterized customer request interpreter (explanation) - Various specific behaviors of the rules and Composite, Flyweight, Iterator, Visitor
Iterator - Traversing items in different ways, not exposing internal details
Mediator --- For the sake of looseness, reduce the number of object connections, let the object interacts MEMENTO by intermediary: Reserved copy of the original data in memory so that the rotary operation .Observer (observers) - one one one one Object-dependent relationship, one has another automatic update state (status) - through state changes affect behavior. Related flyweight mode
The Strategy Algorithm is encapsulated into a separate class template method (template method) - Custom instance method in subclass, after extending the sub-class overload, can Visitor (visitors) - What can I access which can be accessed? =========== Structure mode FACADE Uniform Use the interface proxy to provide an agent for another object
Flyweight will independently into a class, reduce memory consumption, seeking to use Adapter hybrids to match the unrelated two-class Bridge abstraction and behavior, each independent, but can dynamically combine Decorator: decoration, painter, painter It is used to brush the paint, then the object of the brush paint we call Decoratee. These two entities are required in Decorator mode to make the client with consistency for the use of a single object and combination objects.
Decorator definition: Dynamically add some additional responsibilities to an object