Gamma Categorization#
设计模式通常被分为三类
这被称为Gamma分类(纪念Erich Gamma)
创造型模式 Creational Patterns#
- 处理对象的创建
- 显示(构造函数)或隐式(依赖注入DI,反射等)
- 整批的(单语句single statement)或分段的(一步一步地step-by-step)
结构性模式 Structural Patterns#
- 和结构相关的(如类成员)
- 许多模式是模仿隐含于它之下的类的接口的包装器
- 强调良好API设计的重要性
行为型模式 Behavioral Patterns#
- 没有中心主题
