Closure: The Definitive Guide by Michael Bolin

Price: £24.99

Discount: 35%
RRP: 38.50

More Details

Description

If you're ready to use Closure to build rich web applications with JavaScript, this hands-on guide has precisely what you need to learn this suite of tools in depth. Closure makes it easy for experienced JavaScript developers to write and maintain large and complex codebases -- as Google has demonstrated by using Closure with Gmail, Google Docs, and Google Maps.

 Author and Closure contributor Michael Bolin has included numerous code examples and best practices, as well as valuable information not available publicly until now. You'll learn all about Closure's Library, Compiler, Templates, testing framework, and Inspector -- including how to minify JavaScript code with the Compiler, and why the combination of the Compiler and the Library is what sets Closure apart from other JavaScript toolkits.

* Learn how the Compiler significantly reduces the amount of JavaScript users have to download when visiting your site
* Discover several ways to use the Compiler as part of your build process
* Learn about type expressions, primitives, and common utilities
* Understand how Closure emulates classes and class-based inheritance
* Use Closure Templates on the server and the client from either JavaScript or Java
* Test and debug your JavaScript code, even when it's compiled

CONTENTS:

Foreword; Preface; My Experiences with Closure; Audience; ECMAScript Versus JavaScript; Using This Book; Conventions Used in This Book; Using Code Examples; Safari(R) Books Online; How to Contact Us; Acknowledgments; Chapter 1: Introduction to Closure; 1.1 Tools Overview; 1.2 Closure Design Goals and Principles; 1.3 Downloading and Installing the Tools; 1.4 Example: Hello World; Chapter 2: Annotations for Closure JavaScript; 2.1 JSDoc Tags; 2.2 Type Expressions; 2.3 JSDoc Tags That Do Not Deal with Types; 2.4 Is All of This Really Necessary?; Chapter 3: Closure Library Primitives; 3.1 Dependency Management; 3.2 Function Currying; 3.3 Exports; 3.4 Type Assertions; 3.5 Unique Identifiers; 3.6 Internationalization (i18n); 3.7 Object Orientation; 3.8 Additional Utilities; Chapter 4: Common Utilities; 4.1 goog.string; 4.2 goog.array; 4.3 goog.object; 4.4 goog.json; 4.5 goog.dom; 4.6 goog.dom.classes; 4.7 goog.userAgent; 4.8 goog.userAgent.product; 4.9 goog.net.cookies; 4.10 goog.style; 4.11 goog.functions; Chapter 5: Classes and Inheritance; 5.1 Example of a Class in Closure; 5.2 Example of a Subclass in Closure; 5.3 Example of an Interface in Closure; 5.4 Multiple Inheritance; 5.5 Enums; 5.6 goog.Disposable; Chapter 6: Event Management; 6.1 A Brief History of Browser Event Models; 6.2 Closure Provides a Consistent DOM Level 2 Events API Across Browsers; 6.3 Handling Keyboard Events; Chapter 7: Client-Server Communication; 7.1 Server Requests; 7.2 Resource Loading and Monitoring; 7.3 Cross-Domain Communication; 7.4 Uploading Files; 7.5 Comet; Chapter 8: User Interface Components; 8.1 Design Behind the goog.ui Package; 8.2 goog.ui.Component; 8.3 goog.ui.Control; 8.4 goog.ui.Container; 8.5 Using Common Components; 8.6 Creating Custom Components; Chapter 9: Rich Text Editor; 9.1 Design Behind the goog.editor Package; 9.2 Creating an Editable Region; 9.3 Extending the Editor: The Plugin System; 9.4 UI Components; 9.5 Selections; Chapter 10: Debugging and Logging; 10.1 Creating Logging Information; 10.2 Displaying Logging Information; 10.3 Profiling JavaScript Code; 10.4 Reporting JavaScript Errors; Chapter 11: Closure Templates; 11.1 Limitations of Existing Template Systems; 11.2 Introducing Closure Templates; 11.3 Creating a Template; 11.4 Internationalization (i18n); 11.5 Compiling Templates; 11.6 Defining a Custom Function; Chapter 12: Using the Compiler; 12.1 Benefits of Using the Compiler; 12.2 How the Compiler Works; 12.3 Compiler Options; 12.4 Running the Compiler; 12.5 Integrating the Compiler into a Build Process; 12.6 Partitioning Compiled Code into Modules; Chapter 13: Advanced Compilation; 13.1 What Happens During Compilation; 13.2 Preparing Code for the Compiler; 13.3 Checks Provided by the Compiler; 13.4 Optimizations Performed by the Compiler; Chapter 14: Inside the Compiler; 14.1 Tour of the Codebase; 14.2 Hidden Options; 14.3 Example: Extending CommandLineRunner; 14.4 Example: Visualizing the AST Using DOT; 14.5 Example: Creating a Compiler Check; 14.6 Example: Creating a Compiler Optimization; Chapter 15: Testing Framework; 15.1 Creating Your First Test; 15.2 Mock Objects; 15.3 Testing to Ensure That an Error Is Thrown; 15.4 Testing Input Events; 15.5 Testing Asynchronous Behavior; 15.6 Running a Single Test; 15.7 Running Multiple Tests; 15.8 Automating Tests; 15.9 System Testing; Chapter 16: Debugging Compiled JavaScript; 16.1 Verify That the Error Occurs in Uncompiled Mode; 16.2 Format Compiled Code for Debugging; 16.3 Compile with --debug=true; 16.4 Use the Closure Inspector; Inheritance Patterns in JavaScript; Example of the Functional Pattern; Example of the Pseudoclassical Pattern; Drawbacks to the Functional Pattern; Potential Objections to the Pseudoclassical Pattern; Frequently Misunderstood JavaScript Concepts; JavaScript Objects Are Associative Arrays Whose Keys Are Always Strings; There Are Several Ways to Look Up a Value in an Object; Single-Quoted Strings and Double-Quoted Strings Are Equivalent; There Are Several Ways to Define an Object Literal; The prototype Property Is Not the Prototype You Are Looking For; The Syntax for Defining a Function Is Significant; What this Refers to When a Function Is Called; The var Keyword Is Significant; Block Scope Is Meaningless; plovr; Getting Started with plovr; Config Files; Build Command; Serve Command; Generating Externs from Exports; Generating a Source Map; Colophon;
Published

07 Oct 2010

Publisher

O'REILLY & ASSOCIATES

ISBN

9781449381875

Pages

564

Static Book Details Index Page - Click Here to go to Computer Manuals Website