Cargando…

Learning JavaScript Design Patterns : a JavaScript and React developer's guide /

Do you want to write beautiful, structured, and maintainable JavaScript by applying modern design patterns to the language? Do you want clean, efficient, manageable code? Want to stay up-to-date with the latest best practices? If so, the updated second edition of Learning JavaScript Design Patterns...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Osmani, Addy (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Sebastopol, CA : O'Reilly Media, 2023.
Edición:Second edition.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Cover
  • Copyright
  • Table of Contents
  • Preface
  • Structure of the Book
  • Conventions Used in This Book
  • Using Code Examples
  • O'Reilly Online Learning
  • How to Contact Us
  • Acknowledgments
  • Chapter 1. Introduction to Design Patterns
  • History of Design Patterns
  • What Is a Pattern?
  • An Everyday Use Case for Design Patterns
  • Summary
  • Chapter 2. "Pattern"-ity Testing, Proto-Patterns, and the Rule of Three
  • What Are Proto-Patterns?
  • The "Pattern" Tests
  • Rule of Three
  • Summary
  • Chapter 3. Structuring and Writing Patterns
  • The Structure of a Design Pattern
  • Well-Written Patterns
  • Writing a Pattern
  • Summary
  • Chapter 4. Anti-Patterns
  • What Are Anti-Patterns?
  • Anti-Patterns in JavaScript
  • Summary
  • Chapter 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, and Setters
  • Classes in JavaScript Frameworks
  • Summary
  • Related Reading
  • Chapter 6. Categories of Design Patterns
  • Background
  • Creational Design Patterns
  • Structural Design Patterns
  • Behavioral Design Patterns
  • Design Pattern Classes
  • Summary
  • Chapter 7. JavaScript Design Patterns
  • Creational Patterns
  • 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 Prototype Pattern
  • The Factory Pattern
  • When to Use the Factory Pattern
  • When Not to Use the Factory Pattern
  • Abstract Factories
  • Structural Patterns
  • The Facade Pattern
  • The Mixin Pattern
  • Subclassing
  • Mixins
  • Advantages and Disadvantages
  • The Decorator Pattern
  • Pseudoclassical Decorators
  • Interfaces
  • Abstract Decorators
  • Advantages and Disadvantages
  • Flyweight
  • 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
  • Behavioral Patterns
  • The Observer Pattern
  • Differences Between the Observer and Publish/Subscribe Pattern
  • Advantages
  • Disadvantages
  • Publish/Subscribe Implementations
  • The Mediator Pattern
  • A Simple Mediator
  • Similarities and Differences
  • Event Aggregator Use
  • Mediator Use
  • Event Aggregator (Pub/Sub) and Mediator Together
  • Mediator/Middleware in Modern JavaScript
  • Mediator Versus Facade
  • The Command Pattern
  • Summary
  • Chapter 8. JavaScript MV* Patterns