Design mode usage rankings

xiaoxiao2021-03-06  82

Design mode usage rankings

Using the frequency belonging Type Mode Mode Mode Simply defined 5 Create Singleton Single Ensure that a class has only one instance and provides a global access point access to it. 5 Structure Composite Combination Mode combines objects into a tree structure to represent partial overall relationships, composite makes the user consistency for a single object and combined object. 5 Structure FACADE Appearance provides a consistent interface for a set of interfaces in a subsystem, and FACADE provides a high-level interface that makes the subsystem easier to use. 5 Structure Proxy Agents Provide a proxy for other objects to control access to this object 5 behavioral Iterator iterator iterator iterator sequence provides a method of accessing a polymeric object, and does not need to expose the internal representation of the object. 5 Behavior OBServer Observer Defines a pair of dependencies between objects. When the status of an object changes, all objects that depend on its object are notified. 5 Behavior Template Method Template Method Defines the skeleton of the algorithm in an operation, and some steps are delayed into the subclass, and the TemplateMethod allows the subclass to redefine the algorithm to redefine certain specific steps. 4 Create an Abstract Factory Abstract Factory provides an interface to create a series of associated or interdependent objects without having to specify their specific classes. 4 Create a Factory Method Factory method defines an interface to create an object, which allows the subclass to instantiate which class, Factory Method enables an instantiation of a class to the subclass. 4 Structure Adapter adapter converts a class of interfaces into another interface that customers want, the Adapter mode makes it possible to work together because interfaces are not compatible without work together. 4 Structure Decrator Decoration Dynamically adds some additional responsibilities to an object, in terms of increased features, Decorator mode is more flexible compared to generating subclasses. 4 Behaviped Command Commands Package a request to an object, allowing you to use different requests to parameterize the customer, queue, request log, and support the revocable operation. 4 Behavior State Status Allows the object to change his behavior when its internal state changes. Objects seem to change his class. 4 Behavioral Strategy Policy Mode Defines a series of algorithms to encaps them and enable them to replace each other, this mode makes the algorithm can be independent of their customers. 3 Creating a Builder Builder Separates a complex object to his representation, making the same build process can create different representations. 3 Structure BRIDGE bridges separate the abstraction section to its implementation part, so that they can change independently. 3 Behavior CHINA OF RESPONSIBILITY duties The plurality of objects have the opportunity to handle the request, thereby avoiding the coupling relationship between the requested sender and the recipient 2 Create a prototype prototype specified by the prototype instance, and passed the copy These prototypes create new objects. 2 Structure Flyweight Enjoyment Yuan 2 Behavior Mediator Mediator with a mediation object to encapsulate some columns interaction. 2 Behavior Visitor Visitor Mode represents an operation of each element in an object structure, which allows you to define new operations for this element without changing the elements. 1 Behavioral Interpreter Interpreter gives a language to define a representation of his grammar, and define an interpreter that uses this representation to explain the sentence in the language. 1 Behavior MEMENTO Memo The internal state of an object is captured without damaging the object, and saves this status outside of the object.

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

New Post(0)