23 design patterns (simple display)

1 Introduction

Recent evaluation of relevant knowledge, some learning to write notes about the design model, first column columns classic design patterns which have it, stroked it learning course, later time, then it is specifically for the 23 classic design mode of learning software each individual writing it.

I found a great blog very detailed, worth a visit: https: //www.cnblogs.com/geek6/p/3951677.html

2. What are design patterns?

It can be divided into three categories.

2.1 create schema (five kinds)

  • Factory Method pattern
  • Abstract factory pattern
  • Singleton
  • Builder mode
  • Prototype mode

2.2 Structural mode (7 types)

  • Adapter mode
  • Decorator
  • Proxy mode
  • Facade pattern
  • Bridge Mode
  • Combined mode
  • Flyweight

2.3 behavioral patterns (11 kinds)

  • Strategy Mode
  • Template Method Pattern
  • Observer Pattern
  • Iterator pattern
  • Chain of Responsibility pattern
  • Command Mode
  • Memento Pattern
  • State mode
  • Visitor Pattern
  • Intermediary model
  • Interpreter pattern

3. The relationship between the various design model

img

4. Design Patterns six principles

General principles: the principle of opening and closing (Open Close Principle)

  • Single Responsibility Principle
  • Richter substitution principle (Liskov Substitution Principle)
  • Dependency Inversion principle (Dependence Inversion Principle)
  • Interface Segregation Principle (Interface Segregation Principle)
  • Demeter (the least known principle) (Demeter Principle)
  • Synthesis of multiplexing principles (Composite Reuse Principle)
Published 20 original articles · won praise 4 · Views 4642

Guess you like

Origin blog.csdn.net/qq_41996454/article/details/104096569