Skip to content

broven/design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design patterns in JS

每一个设计模式的基本套路都是这样的:

  1. 适用场景, 说出几个实际使用的例子, 帮助你了解这大概是个啥
  2. In JAVA 这部分会给出这个设计模JAVA中的基本样子, 感觉从JAVA来理解能更加方便
  3. 优缺点
  4. In JS 在JS中这个设计模式的写法

设计模式

  • Creational 创建对象
    • Singleton 只拥有一个对象
    • Prototype
    • Simple Factory
    • Factory
    • Abstract Factory
    • Builder
  • Structural 把类和对象组合到更大的结构中
    • Adapter
    • Bridge
    • Composite
    • Decorator
    • Facade
    • Flyweight
    • Proxy
  • Behavioral 类和对象如何交配职责
    • Chain of Responsiblity
    • Command
    • Lterator
    • Mediator
    • Memeto
    • Observer
    • Visitor
    • Strategy
    • State
    • Template Method

About

[In progress]design patterns with example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published