List of Gof-23 design pattern names

Source: Internet
Author: User

工欲善其事, its prerequisite.

Before you really use design patterns, you must know the scenarios for each design pattern. A design pattern is a fixed solution that is generated for a fixed scenario. There are definite scenarios, and there are definite ways and means of design.

Complete design pattern:

Abstract Factory: An abstraction factory that provides an interface to create a series of interrelated or interdependent objects without specifying their specific classes.

Adapter: An adapter that transforms the interface of one class into the interface of another class that the customer wants. The Adpter mode makes it possible for those classes to work together because the interfaces are incompatible and cannot work together.

Briage: bridging, separating the abstract part from its implementation so that they can change independently.

Builder: A builder who separates the construction of a complex object from its representation. Enables the same build process to create different representations.

Chain of Responsibility: A chain of responsibility that enables multiple objects to handle this request by decoupling the sender from the recipient. Connect the objects to a chain and pass the request along this chain until an object processes the request.

Command: Commands that encapsulate a request as an object, allowing you to parameterize the customer with different requests, queue the request, or record the request log, and support the revocable operation.

Composite: Combined mode, which combines objects into a tree structure to represent a "partial-whole" hierarchy. Composite enables customers to have consistent use of individual objects and composite objects.

    Decorator: Decorate, dynamically add some extra responsibilities to an object. In terms of extended functionality, Decortor mode BI generates subclasses in a more flexible way.

Facade: appearance, provides a consistent interface for a set of interfaces for a subsystem, facade mode defines a high-level interface that makes this subsystem easier to use.

Factory method: Factory methods, define an interface for creating objects, and let subclasses decide which class to instantiate. Factory method causes the instantiation of a class to be deferred to subclasses.

    Flyweigth: Enjoy meta-mode, using sharing technology to effectively support a large number of fine-grained objects.

Interpreter: An interpreter, given a language, defines its grammatical representation, and defines an interpreter that uses that representation to interpret sentences in a language.

Iterator: An iterator that provides a way to sequentially access individual elements in an aggregated object without exposing the object's internal representation.

Mediator: A mediator that encapsulates a series of object interactions with a mediation object. Intermediaries make the objects do not need to display the mutual references, so that they are loosely coupled, and can independently change the interaction between them.

Mememto: A memo that, without destroying the encapsulated type, is the internal state of a Bo or an object and saves the state outside that object. The object can then be restored to the saved state.

Observer: The Observer defines a one-to-many relationship between objects so that when the state of an object changes, all objects that depend on it are notified and refreshed automatically.

Prototype: Prototype mode, which specifies the kind of object created with the prototype instance, and creates a new object by copying the prototype.

Proxy: An agent that provides an agent for other objects to control access to this object.

Singleton: Singleton, which guarantees that a class has only one instance, and provides a global access point to access it.

State: States that allow an object to change its behavior when its internal state changes. The object seems to modify the class that it belongs to.

Strategy: A strategy model that defines a series of algorithms, encapsulates them one by one, and makes them interchangeable with each other. Stategy can make the algorithm change independently of the customers who use it.


Template method, which defines the skeleton of an algorithm in an operation, and delays some steps into a subclass, which allows subclasses to redefine some specific steps of the algorithm without altering the structure of an algorithm.

Visitor: A visitor that represents an action that acts on the elements of an object structure. It allows you to define new operations that act on these elements without changing the class of each element.

List of Gof-23 design pattern names

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.