Classification of design patterns

Source: Internet
Author: User

1. classification based on objective criteria refers to the work done by the specified mode. There are three types: (1) Creational (creation type): Related to object creation. (2) Structural: A combination of processing classes or objects. (3) Behavioral: describes how classes or objects interact and how responsibilities are assigned. 2. according to the range criterion classification, the specified mode is used for the class or for the object. There are two types: (1) Class Mode: used to process the relationship between the class and the subclass. These relations are established through inheritance, it is static and has been determined during compilation. In a sense, almost all models use inheritance mechanisms. Therefore, the "class mode" here refers to the mode for centralized processing of Inter-class relationships. Only a few of them belong to this type. (2) Object Mode: it is used to process the relationships between objects. These relationships are dynamic and can be changed during running. Www.2cto.com
Scope \ objective create (Creational) structured (Structural) behavior (Behavioural) Class Simple Factory (Simple Factory) Adapter mode (Adapter_class) Interpreter mode (Interpreter) factory Method Template method object Abstract Factory Adapter mode (Adapter _ object) Chain of Responsibility) builder Bridge Command mode (Command) Prototype Composite Iterator mode (Iterator) Singleton) decorator: Mediator: Facade: Memento (Flyweight) (Observer) Proxy mode (Proxy) status mode (State) Strategy Mode (Strategy) Visitor mode (Visitor) Creation Mode is to create an object rather than directly instantiate an object, this makes the program more flexible when determining which object to create under a given circumstances. Structured mode combines a group of objects into a larger structure, such as complex user interfaces or report data. The behavior mode defines the communication between images in the system and the process control in complex programs.

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.