In the past few days, we have become increasingly aware of the importance of java basics. I feel that many basic things have not been learned well. So we started the system learning of the design model.
I always think that the essence of a pattern is a method. But here is a professional word.
I recommend a book "learning design patterns". First, the design pattern is classified as follows:
Creation Mode |
Simple Factory) |
Factory Method) |
Abstract Factory) |
Builder (creator Mode) |
Prototype (Prototype) |
Singleton (Singleton Mode) |
|
Structural Mode |
Facade (appearance Mode) |
Adapter (Adapter Mode) |
Proxy (Proxy Mode) |
Decorator) |
Bridge) |
Composite (Combination Mode) |
Flyweight (meta Mode) |
|
Behavior mode |
TemplateMethod (template method mode) |
Observer (Observer Mode) |
State) |
Strategy) |
Chain of Responsibility (Responsibility Chain mode) |
Command (Command mode) |
Visitor (Visitor Mode) |
Mediator) |
Memento (memorandum Mode) |
Iterator (Iterator Mode) |
Interpreter (Interpreter Mode) |
|
The creation mode mainly explores object creation. My understanding is how to instantiate a class.
The structural model mainly discusses the object dependency. My understanding is how to get the class instance.
Behavior patterns are mainly used to explore the behavior of objects. My understanding is how to organize the methods in the class.
Well, today we have learned so much ......
Author: "xiaoshuai home"