Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

dongyuanxin/design-pattern-demos

Repository files navigation

Wow!这是一本多语言实现的设计模式的小册 👇

放在开头

目前采用javascript靠这吃饭)和python纯粹喜欢)两种语言实现。诚然,每种设计模式都有多种实现方式,但此小册只记录最直截了当的实现方式 :)

如果有热心伙伴提供C++Java等其他语言的实现,欢迎在Github中发起 pr。我会第一时间在文档和相关文章中注明您的姓名。

项目背景

最近拜读了腾讯团队出版的《Javascript 设计模式与开发实践》,边读边敲边 google 的过程中收货颇多:原来代码还可以这么写!

但是对于初学者,或者变更开发语言的程序员来说,重新阅读一本深入的、大篇幅的设计模式相关书籍成本过高。

如何快速地领会设计模式的精髓?如何在不同的语言中实现设计模式?便是这本小册的初衷。

项目地址

  1. 每天一个设计模式·多语言实现: https://godbmw.com/passages/2018-10-23-design-pattern-code/
  2. 每天一个设计模式之单例模式:https://godbmw.com/passages/2018-10-23-singleton-pattern/
  3. 每天一个设计模式之策略模式: https://godbmw.com/passages/2018-10-25-stragegy-pattern/
  4. 每天一个设计模式之代理模式: https://godbmw.com/passages/2018-11-01-proxy-pattern/
  5. 每天一个设计模式之迭代器模式: https://godbmw.com/passages/2018-11-06-iter-pattern/
  6. 每天一个设计模式之订阅-发布模式: https://godbmw.com/passages/2018-11-18-publish-subscribe-pattern/
  7. 每天一个设计模式之命令模式: https://godbmw.com/passages/2018-11-25-command-pattern/
  8. 每天一个设计模式之组合模式: https://godbmw.com/passages/2018-12-12-composite-pattern/
  1. Singleton Parttern: 单例模式
  2. Stragegy Pattern: 策略模式
  3. Proxy Pattern: 代理模式
  4. Iter Pattern: 迭代器模式
  5. Publish Subscribe Pattern: 订阅-发布模式
  6. Command Pattern: 命令模式
  7. Composite Pattern: 组合模式

关于作者

About

💗 Learn and Code Design Pattern every day based on LOVE.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published