简介
分类
INFO
🔥 大热,必会
⭐ 要会
📖【JavaScript 设计模式与开发实践】书里有
创建型 Creational Patterns
- 原型模式 Prototype Pattern ⭐
- 工厂模式 Factory Pattern
- 工厂方法模式 Factory Method Pattern ⭐
- 抽象工厂模式 Abstract Factory Pattern
- 单例模式 Singleton Pattern ⭐
- 建造者模式 Builder Pattern
结构型 Structural Patterns
- 装饰器模式 Decorator Pattern ⭐
- 代理模式 Proxy Pattern ⭐
- 适配器模式 Adapter Pattern ⭐
- 外观模式 Facade Pattern 📖
- 组合模式 Composite Pattern 📖
- 享元模式 Flyweight Pattern 📖
- 桥接模式 Bridge Pattern
行为型 Behavioral Patterns
- 观察者 & 发布订阅模式 Observer Pattern 🔥
- 中介者模式 Mediator Pattern 📖
- 迭代器模式 Iterator Pattern ⭐
- 策略模式 Strategy Pattern ⭐
- 职责链模式 Chain of Responsibility Pattern ⭐
- 模板方法模式 Template Method Pattern 📖
- 命令模式 Command Pattern 📖
- 状态模式 State Pattern 📖
- 访问者模式 Visitor Pattern
- 备忘录模式 Memento Pattern
- 解释器模式 Interpreter Pattern
参考
书
- JavaScript 设计模式与开发实践
作者:曾探,16 种,除第 2 部分列出的 14 种,原型模式在 1.4 章节,外观模式在 19.2 章节- 中文 PDF - 私人百度盘
以下文章都参考的上面的书:
文章
- Vue 前端设计模式梳理
6种(单例,工厂,策略,代理,适配器,观察者/发布订阅) - 设计模式之美-前端
23 种 - JavaScript 常见设计模式解析
6 种(观察者,中介者,代理,单例,工厂,装饰器) - Javascript 常用的设计模式详解
10 种(工厂,单例,模块,代理,职责链,命令,模板方法,策略,发布订阅,中介者)
英文网站
- JavaScript Design Patterns
- Design Patterns - GeeksforGeeks