使用设计模式的好处
- 行业标准
- 节省时间
- 代码强壮,易读,可复用
设计模式分为三类
- 创造设计模式
解决方向:解决创建实例问题
原文:The basic form of object creation could result in design problems or add unwanted complexity to the design (基本的创建对象将导致设计问题,或者给设计增加复杂度) - 结构设计模式
解决方向:提供不同的方式创建类的结构
原文:Structural patterns provide different ways to create a class structure, for
example using inheritance and composition to create a large object from
small objects - 行为设计模式
创建型设计模式