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 you 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
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
—Andrée Hansson, Lead Front-End Developer, presis!
Chapter 1 Introduction
Chapter 2 What Is a Pattern?
We Already Use Patterns Every Day
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
Creational Design Patterns
Structural Design Patterns
Behavioral Design Patterns
Chapter 8 Design Pattern Categorization
A Brief Note on Classes
The Constructor Pattern
The Module Pattern
The Revealing Module Pattern
The Singleton Pattern
The Observer Pattern
The Mediator Pattern
The Prototype Pattern
The Command Pattern
The Facade Pattern
The Factory Pattern
The Mixin Pattern
The Decorator Pattern
Decorators with jQuery
Advantages and Disadvantages
What Does MVC Give Us?
Pros and Cons
MVVM with Looser Data Bindings
MVC Versus MVP Versus MVVM
Backbone.js Versus KnockoutJS
A Note on Script Loaders
AMD and CommonJS: Competing, but Equally Valid Standards
Chapter 12 Design Patterns in jQuery
The Composite Pattern
The Adapter Pattern
The Facade Pattern
The Observer Pattern
The Iterator Pattern
The Proxy Pattern
The Builder Pattern
Chapter 13 jQuery Plug-in Design Patterns
A Lightweight Start Pattern
Complete Widget Factory Pattern
Nested Namespacing Plug-in Pattern
Custom Events Plug-in Pattern (with the Widget Factory)
Prototypal Inheritance with the DOM-to-Object Bridge Pattern
jQuery UI Widget Factory Bridge Pattern
jQuery Mobile Widgets with the Widget Factory
RequireJS and the jQuery UI Widget Factory
Globally and Per-Call Overridable Options (Best Options Pattern)
The pheasant cuckoo has a long tail and a short, dark brown crest. Its diet consists ofinsects, which it catches by making rattling sounds with its feathers and clapping itsbill, then running several steps forward and pecking at the ground. Although it is aninsectivore, it may also feed on small lizards and nestlings.
Like many other cuckoos, the pheasant cuckoo lays its eggs in another bird’s nest.When the eggs hatch, the adoptive mother will recognize the cuckoo’s offspring as herown, and the hatchlings will imprint on their adoptive mother. Acting on instinct,cuckoo hatchlings will push the host parent’s eggs out of the nest to make room forthemselves. Unlike the European cuckoo, however, the pheasant cuckoo is not an obligatebrood parasite; it still has the ability to construct nests of its own.
The cover image is a loose plate engraving, origin unknown. The cover font is AdobeITC Garamond. The text font is Linotype Birka; the heading font is Adobe MyriadCondensed; and the code font is LucasFont’s TheSansMonoCondensed.
I love the style of this book. It is organized well and makes it easy to lookup many common patterns. The book goes so far to explain the usual application of such patterns and offers several different styles for them. It also offers pros and cons for each pattern. It is obvious the author has done good research and has used these patterns in the wild.
The book is a reference book and does not read well front to back. It is designed as a lookup, Find the pattern you want or look up a patter by name and be provided with a sample and well written explanations. Great for conversation starters. A dictionary of good practises.
Bottom Line Yes, I would recommend this to a friend