Table Of ContentPreface Chapter 1: Introduction Chapter 2: What Is a Pattern? Chapter 3: "Pattern"-ity Testing, Proto-Patterns, and the Rule of Three Chapter 4: The Structure of a Design Pattern Chapter 5: Writing Design Patterns Chapter 6: Anti-Patterns Chapter 7: Categories of Design Patterns Chapter 8: Design Pattern Categorization Chapter 9: JavaScript Design Patterns Chapter 10: JavaScript MV* Patterns Chapter 11: Modern Modular JavaScript Design Patterns Chapter 12: Design Patterns in jQuery Chapter 13: jQuery Plug-in Design Patterns Chapter 14: Conclusions References Colophon
SynopsisIf you want to write beautiful, structured, and maintainable JavaScript code, this guide shows you how to apply both classical and modern design patterns to the language. The patterns in this book provide reusable code solutions to common problems in software design, and give you a shared vocabulary for describing solutions to others. Youll explore several popular design patterns in plain JavaScript as well as jQuery and other abstracted libraries. If youre familiar with concepts such as closures and prototypal inheritance, youll be able to determine why some patterns may be more suitable for your projects than others. Learn the structure of design patterns and how theyre written Examine basic pattern categories: creational, structural, behavioral, and anti-patterns Get the basics of 15 JavaScript implementations of classical and modern design patterns Dive into several popular JavaScript patterns in greater detail - including some less frequently used Discover what design patterns look like when implemented with jQuery Explore three formats for writing modular JavaScript: AMD, CommonJS, and Harmony Learn popular design patterns for jQuery plugins, With Learning JavaScript Design Patterns , you'll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-date with the latest best practices, this book is for you. Explore many popular design patterns, including Modules, Observers, Facades, and Mediators. Learn how modern architectural patterns--such as MVC, MVP, and MVVM--are useful from the perspective of a modern web application developer. This book also walks experienced JavaScript developers through modern module formats, how to namespace code effectively, and other essential topics. Learn the structure of design patterns and how they are written Understand different pattern categories, including creational, structural, and behavioral Walk through more than 20 classical and modern design patterns in JavaScript Use several options for writing modular code--including the Module pattern, Asyncronous Module Definition (AMD), and CommonJS Discover design patterns implemented in the jQuery library Learn popular design patterns for writing maintainable jQuery plug-ins "This book should be in every JavaScript developer's hands. It's the go-to book on JavaScript patterns that will be read and referenced many times in the future."--Andrée Hansson, Lead Front-End Developer, presis!, With Learning JavaScript Design Patterns , you'll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-date with the latest best practices, this book is for you. Explore many popular design patterns, including Modules, Observers, Facades, and Mediators. Learn how modern architectural patterns--such as MVC, MVP, and MVVM--are useful from the perspective of a modern web application developer. This book also walks experienced JavaScript developers through modern module formats, how to namespace code effectively, and other essential topics. Learn the structure of design patterns and how they are written Understand different pattern categories, including creational, structural, and behavioral Walk through more than 20 classical and modern design patterns in JavaScript Use several options for writing modular code--including the Module pattern, Asyncronous Module Definition (AMD), and CommonJS Discover design patterns implemented in the jQuery library Learn popular design patterns for writing maintainable jQuery plug-ins "This book should be in every JavaScript developer's hands. It's the go-to book on JavaScript patterns that will be read and referenced many times in the future."--Andr e Hansson, Lead Front-End Developer, presis, If you want to write beautiful, structured, and maintainable JavaScript code, this guide shows you how to apply both classical and modern design patterns to the language.