# JavaDesignPattern **Repository Path**: zengqiang_wang/java-design-pattern ## Basic Information - **Project Name**: JavaDesignPattern - **Description**: 记录设计模式的Java落地实现 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-01-01 - **Last Updated**: 2023-02-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DesignPattern 设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。 设计模式分为三种类型,共23种: - **创建型模式**:[单例模式](https://github.com/youlookwhat/DesignPattern#3-单例设计模式)、[抽象工厂模式](https://github.com/youlookwhat/DesignPattern#2-工厂模式)、[建造者模式](https://github.com/youlookwhat/DesignPattern#11-建造者模式)、[工厂模式](https://github.com/youlookwhat/DesignPattern#2-工厂模式)、[原型模式](https://github.com/youlookwhat/DesignPattern#12-原型模式)。 - **结构型模式**:[适配器模式](https://github.com/youlookwhat/DesignPattern#5-适配器模式)、[桥接模式](https://github.com/youlookwhat/DesignPattern#15-桥接模式)、[装饰模式](https://github.com/youlookwhat/DesignPattern#7-装饰者模式)、[组合模式](https://github.com/youlookwhat/DesignPattern#16-组合模式)、[外观模式](https://github.com/youlookwhat/DesignPattern#8-外观模式)、[享元模式](https://github.com/youlookwhat/DesignPattern#13-享元模式)、[代理模式](https://github.com/youlookwhat/DesignPattern#14-代理模式)。 - **行为型模式**:[模版方法模式](https://github.com/youlookwhat/DesignPattern#9-模板方法模式)、[命令模式](https://github.com/youlookwhat/DesignPattern#6-命令模式)、[迭代器模式](https://github.com/youlookwhat/DesignPattern#17-迭代器模式)、[观察者模式](https://github.com/youlookwhat/DesignPattern#1-观察者模式)、[中介者模式](https://github.com/youlookwhat/DesignPattern#18-中介者模式)、[备忘录模式](https://github.com/youlookwhat/DesignPattern#19-备忘录模式)、[解释器模式](https://github.com/youlookwhat/DesignPattern#20-解释器模式)、[状态模式](https://github.com/youlookwhat/DesignPattern#10-状态模式)、[策略模式](https://github.com/youlookwhat/DesignPattern#4-策略模式)、[责任链模式](https://github.com/youlookwhat/DesignPattern#21-责任链模式)、[访问者模式](https://github.com/youlookwhat/DesignPattern#22-访问者模式)。 > 参照https://github.com/youlookwhat/DesignPattern所写。如有错误欢迎指正,如有侵权,请联系我删除。 ---- ## 目录 - 1.[ 设计模式 观察者模式(Observer Pattern) 以微信公众服务为例](./docs/1.观察者设计模式/1.观察者设计模式.md) - 1.[ 设计模式 工厂模式(Factory Pattern) 以卖饸饹为例](./docs/2.工厂设计模式/2.工厂设计模式.md) ## 源代码 > - [Observer观察者模式](https://gitee.com/zengqiang_wang/java-design-pattern/tree/master/src/main/java/cn/wangzengqiang/study/designpattern/observer/own) > - [Factory工厂模式](https://gitee.com/zengqiang_wang/java-design-pattern/tree/master/src/main/java/cn/wangzengqiang/study/designpattern/factory/own) ## 项目截图 ![](https://raw.githubusercontent.com/youlookwhat/DesignPattern/master/image/ds1.png) ## 源码地址 - [DesignPattern](https://gitee.com/zengqiang_wang/java-design-pattern) ## 设计模式分析 ### 1. 观察者模式 ## 参考文献 - [CSDN:张鸿洋](http://blog.csdn.net/lmj623565791/article/category/2206597) - [CSDN:dmk877](http://blog.csdn.net/dmk877/article/details/50311791) - [菜鸟教程:设计模式](https://www.runoob.com/design-pattern/design-pattern-intro.html) - [github:设计模式](https://github.com/youlookwhat/DesignPattern) ## About me - **QQ:** 1072805311 - **个人博客:**[http://wangzengqiang.cn/](http://wangzengqiang.cn/) - **CSDN:**[https://blog.csdn.net/Prince140678](https://blog.csdn.net/Prince140678) - **Email:** 15518987725@163.com