Python 23种设计模式全(python例子)

从今年5月份开始打算把设计模式都写到博客里,持续到现在总算是写完了。写的很慢,好歹算是有始有终。对这些设计模式有些理解的不准确,有些甚至可能是错的,请看到的同学拍砖留言。内容来源很杂,大部分参考或者摘录链接都放到里面了。写下来的目的是让自己记忆更深刻,如果能让别人参考一下,带来帮助那最好不过了。设计模式就暂时写完了,今天往后我打算把之前学过用过的性能测试码在博客里。也算是工作生活之余时给自己找点事做。

 

 

创建型

1. Factory Method(工厂方法)--

https://www.cnblogs.com/baxianhua/p/11648485.html

 

2. Abstract Factory(抽象工厂)--

https://www.cnblogs.com/baxianhua/p/11648485.html

 

3. Builder(建造者)--

https://www.cnblogs.com/baxianhua/p/11535677.html

 

4. Prototype(原型)--

https://www.cnblogs.com/baxianhua/p/11498432.html

 

5. Singleton(单例)--

https://www.cnblogs.com/baxianhua/p/11419829.html

 

结构型

6. Adapter Class/Object(适配器)--

https://www.cnblogs.com/baxianhua/p/11388899.html

 

7. Bridge(桥接)--

https://www.cnblogs.com/baxianhua/p/11358707.html

 

8. Composite(组合)--

https://www.cnblogs.com/baxianhua/p/11350253.html

 

9. Decorator(装饰)--

https://www.cnblogs.com/baxianhua/p/11344097.html

 

10. Facade(外观)--

https://www.cnblogs.com/baxianhua/p/11301186.html

 

11. Flyweight(享元)--

https://www.cnblogs.com/baxianhua/p/11190265.html

 

12. Proxy(代理)--

 https://www.cnblogs.com/baxianhua/p/10870612.html

 

行为型

13. Interpreter(解释器)--

https://www.cnblogs.com/baxianhua/p/11160111.html

 

14. Template Method(模板方法)--

https://www.cnblogs.com/baxianhua/p/10910767.html

 

15. Chain of Responsibility(责任链)--

https://www.cnblogs.com/baxianhua/p/11141861.html

 

16. Command(命令)--

 https://www.cnblogs.com/baxianhua/p/11133357.html

 

17. Iterator(迭代器)--

https://www.cnblogs.com/baxianhua/p/11096710.html

 

18. Mediator(中介者)--

 https://www.cnblogs.com/baxianhua/p/11089655.html

 

19. Memento(备忘录)--

https://www.cnblogs.com/baxianhua/p/10955900.html

 

20. Observer(观察者)--

https://www.cnblogs.com/baxianhua/p/10949842.html

 

21. State(状态)--

https://www.cnblogs.com/baxianhua/p/10893976.html

 

22. Strategy(策略)--

https://www.cnblogs.com/baxianhua/p/10926204.html

 

23. Visitor(访问者)--

https://www.cnblogs.com/baxianhua/p/10904122.html

 

posted @ 2019-10-31 12:00  筱筱的春天  阅读(3640)  评论(0编辑  收藏  举报