23 design patterns
Overall, the design patterns into three categories:
* Create a schema (five kinds): ** singleton, factory method pattern, abstract factory pattern, the builder pattern, prototype model
** structural model (seven kinds) : ** adapter mode, decorator pattern proxy mode, aspect mode, bridge mode, combined mode, Flyweight
** behavioral patterns (11 kinds): * strategy mode, the template method pattern, observer pattern, iterators mode, the chain of responsibility pattern, command mode, the memo mode state mode, the visitor pattern, intermediary model to explain the mode.
23 design patterns with the six principles of learning Mind Mapping
Six principles of design patterns
Opening and closing principle
open for extension, but closed for modification. When the program needs to expand, not to modify the existing code to achieve the effect of a hot-swappable. In short, it is to make good, easy to maintain and upgrade the extension of the program. Want to achieve this effect, we need to use interfaces and abstract classes, follow the detailed design, we will mention this point.
Richter substitution principle
Richter substitution principle is one of the basic principles of object-oriented design. Richter substitution principle in that place any base class can appear, sub-class will be able to appear. LSP is inherited cornerstone multiplexed only when the derived class can replace the base class, and the software unit of functionality is not affected, the base class can really be reused, and the derived class can add new on the basis of the base class on behavior. Richter substitution principle is the principle of complementarity closed off. Implement the principle of opening and closing is a key step in abstraction, inheritance and base class and sub-class is the abstract concrete realization, so Richter substitution principle is the specification for concrete steps to achieve the abstract.
Dependency Inversion principle
This principle is the basis of the principle of opening and closing, the specific content: for interface programming to rely on the abstract rather than relying on concrete.
Interface segregation principle
using a plurality of isolated interface, the interface is better than a single use. It also has another meaning is: to reduce the coupling between classes. Thus, the fact that design patterns from large-scale software architecture, easy to upgrade and maintain the software design, which emphasizes reducing reliance, reduce coupling.
Demeter, also known as the principle of least know
the least known principle is that: an entity should occur as little as possible interaction between the entity and the other, such that the independent function modules.
Single Responsibility principle of
single responsibility principle simply, is a class can only be responsible for a duty to modify a class can not affect the other functions, which means that there is only one cause of the class is modified.
So you want to learn how this 23 design patterns and the six principles of systematic? The question I would like to be plagued most of the readers, the Internet to find information on design patterns are fragmented, said the article did not expect meaningful to you, this is asking too much, I'm far from this ability, but if you can have a complete set of learning videos, learning to read the document so that you remember to put this design model, and that the goal of this article is reached.
To this end finishing this small series [23 design patterns and six principles]] [set of documentation and design patterns learning video])
conception of this document lies not only introduces the basic knowledge of design patterns, what more is explained Choosing the right design mode conditions. Because in practice, the abuse or misuse of design patterns is sometimes with the big waste. Therefore, this document describes the process interspersed in the design mode of comparison between different types of models, and gives a number of examples in Java problems Chapter 8, Chapter 9, for readers in-depth understanding.
The first chapter
Chapter Two UML basis of
Chapter III Introduction to Design Patterns
Chapter IV creative mode
Chapter V structural model
Chapter VI behavioral patterns
Chapter VII of the concept and tips
Chapter VIII of design patterns Interview Questions
There are some interview material, it can also help enhance the interview techniques:
Today I took dozens of sets of interview questions free for everyone to share the hope that the epidemic in the past to help the promotion salary increase for all of us.
The latest BATJava compulsory face questions Highlights
2019 BAT latest Big Data Collection compulsory face questions
after the end face of questions and answers Java
JVM face questions and answers
Spring face questions
SpringMVC face questions
SpringBoot face questions
SpringCloud face questions
Tomcat face questions
concurrent programming interview questions
and more thread face questions
above is finishing small series of learning materials, like small partners can focus on small series and help small series forward oh ~ ~ ~