设计模式学习

定义

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.(在软件工程领域,设计模式是对在软件设计领域经常发生的问题的一个通用的、可重复的解决方案。设计模式不是可以转化为代码的最终设计。它是用于解决在众多场景下,某一类问题的一个描述或者模板。)

设计原则

常用设计模式

  • 观察者模式
    • 应用场景
    • 典型实现
  • 装饰者模式
  • 工厂模式
  • 适配器模式
原文地址:https://www.cnblogs.com/harry1989/p/11877080.html