Design Patterns explain - first met design patterns
What design patterns?
Design patterns are useful in the face of people experience the same type of software engineering design problems summed (predecessors is a summary of the code development experience, is to solve a specific problem a series of routines). Design mode is not code, but universal design solution of certain problems. It reminds me: There is a blind alley and take more people, they will become a road.
Wikipedia introduction:
23 design patterns summarized by:
Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides summary wrote "design patterns" in 1995.
The best way to learn design patterns: In your previous design and engineering inside to find where to use them.
Essential purpose is to design software engineering mode to O (N) in the maintenance, scalability, variability, complexity.
Design patterns can be divided into three categories:
One: Create schema
II: Structure pattern
Three: behavioral patterns
What are three models each contain specific patterns? As shown below:
The relationship between design patterns, as shown below:
Thinking question:
In fact, Java IO streams kind of class design decorator pattern is used. As for the advantages of the Decorator pattern, we explain in detail
Digression:
Several principles of design patterns
1: Open Closed Principle
2: Richter substitution principle (LSP)
3: Dependency Inversion principle
4: Interface Segregation Principle
5: Law of Demeter (know at least in principle)
6: Synthesis of multiplexing principles
7: Single Responsibility Principle
This article comes from Kaige Java (kaigejava)
Kaige personal blog: www.kaigejava.com
From the seven principles above, we can see that, in fact, a design pattern is the design of software, starting from large-scale software architecture, for example upgrades and maintenance easy. All, we often hear low coupling, high cohesion. This is a characteristic of the spring.