一,面向对象系统的分析和设计实际上追求的就是两点,一是高内聚(Cohesion),二是低耦合(Coupling)。这也是我们软件设计所追求的,因此无论是OO中的封装、继承、多态,还是设计模式的原则和实例都是为了追求这两个目标,设计模式是一种面向对象分析和设计的思想
二,23种设计模式分类
1,创建型模式:
Factory模式,AbstactFactory模式,Singleton模式,Builder模式,Prototype模式
2,结构型模式:
Bridge模式,Adapter模式,Decorator模式,Composite模式,Flyweight模式,Facade模式,Proxy模式
3,行为模式:
Template模式,Strategy模式,State模式,Observer模式,Memento模式,Mediator模式,Command模式,
Visitor模式,Chain of Responsibility模式,Iterator模式,Interpreter模式
三,后续会挨个介绍以上23种模式