『Learning JavaScript Design Patterns: A JavaScript and React Developer's Guide』
https://gyazo.com/fe73a07c85619bf3e72a80751efd8732
undefined
Design Patterの翻訳
1. Introduction to Design Patterns
History of Design Patterns
What Is a Pattern?
An everyday use case for design patterns
Summary
2. âPatternâ-ity Testing, Proto-Patterns, and the Rule of Three
What are Proto-Patterns?
The âPatternâ Tests
Rule of Three
Summary
3. Structuring and Writing Patterns
The Structure of a Design Pattern
Well Written Patterns
Writing a pattern
Summary
4. Anti-Patterns
What are Anti-Patterns
Anti-Patterns in JavaScript
Summary
5. Modern JavaScript Syntax and Features
The Importance Of Decoupling Applications
Modules With Imports And Exports
Module Objects
Modules Loaded From Remote Sources
Static Imports
Dynamic Imports
Import on Interaction
Import on visibility
Modules For The Server
Advantages of using Modules
Classes With Constructors, Getters & Setters
Classes in JavaScript frameworks
Summary
Related Reading
6. Categories of Design Patterns
Background
Creational Design Patterns
Structural Design Patterns
Behavioral Design Patterns
Design Pattern Classes
Summary
7. JavaScript Design Patterns
Choosing a Pattern
The Constructor Pattern
Object Creation
Basic Constructors
Constructors with Prototypes
The Module Pattern
Object Literals
The Module Pattern
Module Pattern Variations
Modern Module Pattern with WeakMap
Modules with modern libraries
The Revealing Module Pattern
Advantages
Disadvantages
The Singleton Pattern
State management in React
The Observer Pattern
Differences Between the Observer and Publish/Subscribe Pattern
Advantages
Disadvantages
Publish/Subscribe Implementations
A Simple Mediator
Similarities And Differences
Event Aggregator Use
Mediator Use
Event Aggregator (Pub/Sub) And Mediator Together
Mediator/Middleware in modern JavaScript
Mediator Vs. Facade
The Prototype Pattern
The Command Pattern
The Facade Pattern
Notes on Abstraction
The Factory Pattern
When to Use the Factory Pattern
When Not to Use the Factory Pattern
Abstract Factories
The Mixin Pattern
Subclassing
Mixins
Advantages and Disadvantages
The Decorator Pattern
Pseudoclassical Decorators
Interfaces
Abstract Decorators
Advantages and Disadvantages
Using Flyweights
Flyweights and Sharing Data
Implementing Classical Flyweights
Converting Code to Use the Flyweight Pattern
A Basic Factory
Managing the Extrinsic States
The Flyweight Pattern and the DOM
Example: Centralized event handling
Summary
About the Author