设计模式,为每一个设计模式都写了一个简单的代码帮助理解。
设计模式分为三大类: 创建型模式,共五种:工厂方法模式、抽象工厂模式、单例模式、建造者模式、原型模式。 结构型模式,共七种:适配器模式、装饰器模式、代理模式、外观模式、桥接模式、组合模式、享元模式。 行为型模式,共十一种:策略模式、模板方法模式、观察者模式、迭代子模式、责任链模式、命令模式、备忘录模式、状态模式、访问者模式、中介者模式、解释器模式。 其实还有两类:并发型模式和线程池模式。
参考博客:创建型模式 http://blog.csdn.net/qq_24210767/article/details/78776823
结构型模式 http://blog.csdn.net/qq_24210767/article/details/78797792
DesignPattern,I write a very easy code but useful to understand each design patterns.
You can download the source code and learn with some document.This code just assist you to understand the design patterns,In the real develope scence.We may faced more difficult and flexiable problem.
Design patterns are divided into three categories
Create Patterns,Total 5 species:Factory Pattern,Abastract Factory Pattern,Singletion Pattern,Builder Pattern,Prototype Pattern
Structural Patterns,Total 7 species:Adapter Pattern,Decorator Pattern,Proxy Pattern,Facade Pattern,Bridge Pattern,Composite Pattern,Flyweight Pattern.
Behavioral Patterns,Total 11 species:Strategy Pattern,Template Pattern,Observer Pattern,Iterator Pattern,Chain of Responsibility Pattern,Command Pattern,Memento Pattern,StatePattern,Visitor Pattern,Mediator Pattern,Interpreter Pattern. And have another two type:Concurrent Pattern and Thread Pool Pattern.
Reference Blog:Create Patterns: http://blog.csdn.net/qq_24210767/article/details/78776823
Blog:Constract Patterns: http://blog.csdn.net/qq_24210767/article/details/78797792