Common Design Patterns

[1] Abstract Factory
provides an interface for creating a series of related or interdependent objects without specifying their concrete classes.
[2] Adapter
converts the interface of a class into another interface that the client wants. The Adapter pattern enables classes to work together that would otherwise not work together due to incompatible interfaces.
[3] Bridge
separates the abstract part from its implementation part, so that they can all change independently
[4] Builder
separates the construction of a complex object from its representation, so that the same construction process can create different representations
[5] Chain of Responsibility
is to decouple the sender and receiver of the request, so that multiple objects have the opportunity to process the request. Chain these objects together and pass the request down the chain until one object handles it.
[6] Iterator
provides a way to sequentially access each element in an aggregate object without exposing the internal representation of the object
[7] Prototype
specifies the type of object to be created with a prototype instance, and creates a new object by copying the prototype Example
[8] Proxy
[9] Singleton

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326506178&siteId=291194637