Learning JavaScript Design Patterns

Overview

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 ...

See more details below
Paperback
$24.92
BN.com price
(Save 37%)$39.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (17) from $13.80   
  • New (13) from $19.71   
  • Used (4) from $13.80   
Learning JavaScript Design Patterns

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$18.99
BN.com price
(Save 44%)$33.99 List Price

Overview

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!

Read More Show Less

Product Details

  • ISBN-13: 9781449331818
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 8/28/2012
  • Edition number: 1
  • Pages: 254
  • Sales rank: 631,264
  • Product dimensions: 6.90 (w) x 9.10 (h) x 0.60 (d)

Meet the Author

Addy Osmani is a Developer Programs Engineer at Google, working on tools for improving how developers create applications. He's also a member of the jQuery team where he assists with documentation and our learning site project. Some of his other OS work has included contributions to Modernizr and other similar projects. Personal projects include TodoMVC, which helps developers compare JavaScript MVC frameworks and jQuery UI Bootstrap. He also wrote 'Developing Backbone.js Applications' and 'Learning JavaScript Design Patterns' and occasionally tech review books like 'JavaScript Web Applications'. His personal blog is addyosmani.com/blog/.

Read More Show Less

Table of Contents

Preface;
Target Audience;
Credits;
Reading;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Chapter 1: Introduction;
Chapter 2: What Is a Pattern?;
2.1 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;
7.1 Creational Design Patterns;
7.2 Structural Design Patterns;
7.3 Behavioral Design Patterns;
Chapter 8: Design Pattern Categorization;
8.1 A Brief Note on Classes;
Chapter 9: JavaScript Design Patterns;
9.1 The Constructor Pattern;
9.2 The Module Pattern;
9.3 The Revealing Module Pattern;
9.4 The Singleton Pattern;
9.5 The Observer Pattern;
9.6 The Mediator Pattern;
9.7 The Prototype Pattern;
9.8 The Command Pattern;
9.9 The Facade Pattern;
9.10 The Factory Pattern;
9.11 The Mixin Pattern;
9.12 Subclassing;
9.13 Mixins;
9.14 The Decorator Pattern;
9.15 Pseudoclassical Decorators;
9.16 Decorators with jQuery;
9.17 Advantages and Disadvantages;
9.18 Flyweight;
Chapter 10: JavaScript MV* Patterns;
10.1 MVC;
10.2 MVC for JavaScript Developers;
10.3 What Does MVC Give Us?;
10.4 Smalltalk-80 MVC in JavaScript;
10.5 MVP;
10.6 MVVM;
10.7 Pros and Cons;
10.8 MVVM with Looser Data Bindings;
10.9 MVC Versus MVP Versus MVVM;
10.10 Backbone.js Versus KnockoutJS;
Chapter 11: Modern Modular JavaScript Design Patterns;
11.1 A Note on Script Loaders;
11.2 AMD;
11.3 CommonJS;
11.4 AMD and CommonJS: Competing, but Equally Valid Standards;
11.5 ES Harmony;
11.6 Conclusions;
Chapter 12: Design Patterns in jQuery;
12.1 The Composite Pattern;
12.2 The Adapter Pattern;
12.3 The Facade Pattern;
12.4 The Observer Pattern;
12.5 The Iterator Pattern;
12.6 Lazy Initialization;
12.7 The Proxy Pattern;
12.8 The Builder Pattern;
Chapter 13: jQuery Plug-in Design Patterns;
13.1 Patterns;
13.2 A Lightweight Start Pattern;
13.3 Complete Widget Factory Pattern;
13.4 Nested Namespacing Plug-in Pattern;
13.5 Custom Events Plug-in Pattern (with the Widget Factory);
13.6 Prototypal Inheritance with the DOM-to-Object Bridge Pattern;
13.7 jQuery UI Widget Factory Bridge Pattern;
13.8 jQuery Mobile Widgets with the Widget Factory;
13.9 RequireJS and the jQuery UI Widget Factory;
13.10 Globally and Per-Call Overridable Options (Best Options Pattern);
13.11 A Highly Configurable and Mutable Plug-in Pattern;
13.12 What Makes a Good Plug-in Beyond Patterns?;
13.13 Conclusions;
13.14 Namespacing Patterns;
13.15 Namespacing Fundamentals;
13.16 Advanced Namespacing Patterns;
Chapter 14: Conclusions;
References;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)