Books & Videos

Table of Contents

  1. Chapter 1 Introduction to Closure

    1. Tools Overview

    2. Closure Design Goals and Principles

    3. Downloading and Installing the Tools

    4. Example: Hello World

  2. Chapter 2 Annotations for Closure JavaScript

    1. JSDoc Tags

    2. Type Expressions

    3. JSDoc Tags That Do Not Deal with Types

    4. Is All of This Really Necessary?

  3. Chapter 3 Closure Library Primitives

    1. Dependency Management

    2. Function Currying

    3. Exports

    4. Type Assertions

    5. Unique Identifiers

    6. Internationalization (i18n)

    7. Object Orientation

    8. Additional Utilities

  4. Chapter 4 Common Utilities

    1. goog.string

    2. goog.array

    3. goog.object

    4. goog.json

    5. goog.dom

    6. goog.dom.classes

    7. goog.userAgent

    8. goog.userAgent.product

    9. goog.net.cookies

    10. goog.style

    11. goog.functions

  5. Chapter 5 Classes and Inheritance

    1. Example of a Class in Closure

    2. Example of a Subclass in Closure

    3. Example of an Interface in Closure

    4. Multiple Inheritance

    5. Enums

    6. goog.Disposable

  6. Chapter 6 Event Management

    1. A Brief History of Browser Event Models

    2. Closure Provides a Consistent DOM Level 2 Events API Across Browsers

    3. Handling Keyboard Events

  7. Chapter 7 Client-Server Communication

    1. Server Requests

    2. Resource Loading and Monitoring

    3. Cross-Domain Communication

    4. Uploading Files

    5. Comet

  8. Chapter 8 User Interface Components

    1. Design Behind the goog.ui Package

    2. goog.ui.Component

    3. goog.ui.Control

    4. goog.ui.Container

    5. Using Common Components

    6. Creating Custom Components

  9. Chapter 9 Rich Text Editor

    1. Design Behind the goog.editor Package

    2. Creating an Editable Region

    3. Extending the Editor: The Plugin System

    4. UI Components

    5. Selections

  10. Chapter 10 Debugging and Logging

    1. Creating Logging Information

    2. Displaying Logging Information

    3. Profiling JavaScript Code

    4. Reporting JavaScript Errors

  11. Chapter 11 Closure Templates

    1. Limitations of Existing Template Systems

    2. Introducing Closure Templates

    3. Creating a Template

    4. Internationalization (i18n)

    5. Compiling Templates

    6. Defining a Custom Function

  12. Chapter 12 Using the Compiler

    1. Benefits of Using the Compiler

    2. How the Compiler Works

    3. Compiler Options

    4. Running the Compiler

    5. Integrating the Compiler into a Build Process

    6. Partitioning Compiled Code into Modules

  13. Chapter 13 Advanced Compilation

    1. What Happens During Compilation

    2. Preparing Code for the Compiler

    3. Checks Provided by the Compiler

    4. Optimizations Performed by the Compiler

  14. Chapter 14 Inside the Compiler

    1. Tour of the Codebase

    2. Hidden Options

    3. Example: Extending CommandLineRunner

    4. Example: Visualizing the AST Using DOT

    5. Example: Creating a Compiler Check

    6. Example: Creating a Compiler Optimization

  15. Chapter 15 Testing Framework

    1. Creating Your First Test

    2. Mock Objects

    3. Testing to Ensure That an Error Is Thrown

    4. Testing Input Events

    5. Testing Asynchronous Behavior

    6. Running a Single Test

    7. Running Multiple Tests

    8. Automating Tests

    9. System Testing

  16. Chapter 16 Debugging Compiled JavaScript

    1. Verify That the Error Occurs in Uncompiled Mode

    2. Format Compiled Code for Debugging

    3. Compile with --debug=true

    4. Use the Closure Inspector

  1. Appendix Inheritance Patterns in JavaScript

    1. Example of the Functional Pattern

    2. Example of the Pseudoclassical Pattern

    3. Drawbacks to the Functional Pattern

    4. Potential Objections to the Pseudoclassical Pattern

  2. Appendix Frequently Misunderstood JavaScript Concepts

    1. JavaScript Objects Are Associative Arrays Whose Keys Are Always Strings

    2. There Are Several Ways to Look Up a Value in an Object

    3. Single-Quoted Strings and Double-Quoted Strings Are Equivalent

    4. There Are Several Ways to Define an Object Literal

    5. The prototype Property Is Not the Prototype You Are Looking For

    6. The Syntax for Defining a Function Is Significant

    7. What this Refers to When a Function Is Called

    8. The var Keyword Is Significant

    9. Block Scope Is Meaningless

  3. Appendix plovr

    1. Getting Started with plovr

    2. Config Files

    3. Build Command

    4. Serve Command

    5. Generating Externs from Exports

    6. Generating a Source Map

  4. Colophon