Programming is a concrete solution to the problem. just like building a house, what kind of materials should be used to build a style building? What is the specific position... different architects have different methods. to standardize the solution to a specific problem, we can call it a design model.
The Design Pattern in programming provides a good reference for implementation methods in a certain problem domain, which can be reused and efficient.
Let's take a brief look at the Java-related design patterns.
A creation mode (Object creation consumes system resources, and the creattion mode is the creation guide and principles)
1 factory (factory and abstract factory)
2 factory Method)
3 prototype)
4 Builder (Creation)
5 Singleton (Singleton)
B structure mode (objects and objects have a subtle relationship. The structure mode completes inheritance, implementation, and dependency between various types of objects, references for designing robust systems)
6. Facade)
7 proxy)
8 Adapter)
9 Bridge)
10 composite (synthesis)
11 decorator)
12 flyweight (share yuan)
C behavior pattern (behavior pattern mainly refers to abstraction of responsibility and algorithm. Behavior patterns are not only about classes and objects, but also about their interactions. Behavior patterns can be divided into two types: behavior patterns of classes and behavior patterns of objects)
13. Template)
14 command)
15 interpreter (Interpreter)
16 visitor (visitor)
17 iterator (iteration)
18 state)
19 observer (observer)
20 Mediator)
21 memento (Memorandum)
22 chain of responsibility (responsible chain)
23 strategy)
I am going to repeat the basic knowledge of Java. I will introduce the design patterns in these 23 documents one by one later ..