Code Monkey home page Code Monkey logo

designpatternsallexample's Introduction

这个项目将包含大部分设计模式的例子(更新中)
1、设计模式学习的笔记
2、src目录下每一个包,表示一种设计模式
3、每一种设计模式包下,有一个ReadMe文件用于说明该设计模式
4、nouse下为不使用设计模式的代码
5、use下为使用设计模式的代码

目录
策略模式:strategy
观察者模式:observer
装饰模式:decorator
简单工厂模式:simpleFactory
工厂方法模式:factoryMethod
抽象工厂模式:abstractFactory
单例模式:singleton
命令模式:command
适配器模式:adapter
外观模式:facade
模板方法模式:templateMethod
迭代器模式:iterator
组合模式:composite
状态模式:state
代理模式:proxy
桥接模式:bridge
建造者模式:builder
职责链模式:chainOfResponsibility
享元模式:flyweight
解释器模式:interpreter
中介者模式:mediator
备忘录模式:memento
原型模式:prototype
访问者模式:visitor









#并非所有情况都适合设计模式,在没有足够的经验前,多阅读一些其他实际源码的例子或许能给你更多的启发
本人可能对一些设计模式理解有问题,如果写的不正确,还请高手指出,万分感谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.