Books & Videos

Table of Contents

  1. Chapter 1 Introduction

    1. Patterns

    2. JavaScript: Concepts

    3. ECMAScript 5

    4. JSLint

    5. The Console

  2. Chapter 2 Essentials

    1. Writing Maintainable Code

    2. Minimizing Globals

    3. for Loops

    4. for-in Loops

    5. (Not) Augmenting Built-in Prototypes

    6. switch Pattern

    7. Avoiding Implied Typecasting

    8. Avoiding eval()

    9. Number Conversions with parseInt()

    10. Coding Conventions

    11. Naming Conventions

    12. Writing Comments

    13. Writing API Docs

    14. Writing to Be Read

    15. Peer Reviews

    16. Minify…In Production

    17. Run JSLint

    18. Summary

  3. Chapter 3 Literals and Constructors

    1. Object Literal

    2. Custom Constructor Functions

    3. Patterns for Enforcing new

    4. Array Literal

    5. JSON

    6. Regular Expression Literal

    7. Primitive Wrappers

    8. Error Objects

    9. Summary

  4. Chapter 4 Functions

    1. Background

    2. Callback Pattern

    3. Returning Functions

    4. Self-Defining Functions

    5. Immediate Functions

    6. Immediate Object Initialization

    7. Init-Time Branching

    8. Function Properties—A Memoization Pattern

    9. Configuration Objects

    10. Curry

    11. Summary

  5. Chapter 5 Object Creation Patterns

    1. Namespace Pattern

    2. Declaring Dependencies

    3. Private Properties and Methods

    4. Module Pattern

    5. Sandbox Pattern

    6. Static Members

    7. Object Constants

    8. Chaining Pattern

    9. method() Method

    10. Summary

  6. Chapter 6 Code Reuse Patterns

    1. Classical Versus Modern Inheritance Patterns

    2. Expected Outcome When Using Classical Inheritance

    3. Classical Pattern #1—The Default Pattern

    4. Classical Pattern #2—Rent-a-Constructor

    5. Classical Pattern #3—Rent and Set Prototype

    6. Classical Pattern #4—Share the Prototype

    7. Classical Pattern #5—A Temporary Constructor

    8. Klass

    9. Prototypal Inheritance

    10. Inheritance by Copying Properties

    11. Mix-ins

    12. Borrowing Methods

    13. Summary

  7. Chapter 7 Design Patterns

    1. Singleton

    2. Factory

    3. Iterator

    4. Decorator

    5. Strategy

    6. Façade

    7. Proxy

    8. Mediator

    9. Observer

    10. Summary

  8. Chapter 8 DOM and Browser Patterns

    1. Separation of Concerns

    2. DOM Scripting

    3. Events

    4. Long-Running Scripts

    5. Remote Scripting

    6. Deploying JavaScript

    7. Loading Strategies

    8. Summary

  1. Colophon