Design pattern-- Reusable Object-oriented Software Foundation (patterns)
I. Classification of design Patterns
In general, design patterns fall into three broad categories
Creation Mode: Factory method mode, abstract Factory mode, simple interest mode, builder mode, prototype mode (5 types )
Structural mode: Adapter mode, adorner mode, proxy mode, appearance mode, bridging mode, combined mode, enjoy meta-mode (7 kinds )
Behavioral Patterns: Policy mode, template method mode, observer pattern, iteration sub-pattern, responsibility chain mode, Command mode, Memo mode, state mode, visitor mode, intermediary mode, interpreter mode, (11 )
Other modes: and discovery mode and thread pool mode
The six principles of design pattern
1. Opening and closing principle (open close principle)
The opening and closing principle is to say to expand open, to modify close. When the program needs to be modified, can not modify the original code, to achieve a hot plug effect. So an overview of the sentence is: In order to make the programmer extensibility, easy to maintain and upgrade. To achieve such an effect, we need to use interfaces and abstract classes
2. The principle of substitution of Li Shi ()
Java Design Patterns