Giter Club home page Giter Club logo

design-patterns's Introduction

design-patterns

模式是在某种情景下,针对某种问题的某种解决方案.

模式分类

创建型模式

创建型模式涉及到将对象实例化,这类模式都提供一个方法,将客户从需要实例化的对象中解耦。

  • 单例模式(Singleton)
  • 建造者模式(Builder)
  • 抽象工厂模式(Abstract Factory)
  • 抽象方法模式(Abstract Method)
  • 原型模式(Prototype)

结构型模式

结构模式可以让你把类或对象组合到更大的结构中。

  • 装饰器模式(Decorator)
  • 代理模式(Proxy)
  • 组合模式(Composite)
  • 适配器模式(Adapter)
  • 外观模式(Facade)
  • 桥接模式(Bridge)
  • 享元模式(Flyweight)

行为型模式

只要是行为模式,都涉及到类和对象如何交互及分配职责。

  • 模板方法模式(Template Method)
  • 迭代器模式(Iterator)
  • 观察者模式(Observer)
  • 策略模式(Strategy)
  • 命令模式(Command)
  • 状态模式(State)
  • 责任链模式(Chain of Responsibility)
  • 备忘录模式(Memento)
  • 解释器模式(Interpreter)
  • 访问者模式(Visitor)
  • 中介者模式(Mediator)

design-patterns's People

Contributors

nxiangbo avatar

Watchers

James Cloos avatar  avatar

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.