Synopses & Reviews
A good web development framework anticipates what you need to do and makes those tasks easier and more efficient; jQuery practically reads your mind. Developers of every stripe-hobbyists and professionals alike-fall in love with jQuery the minute they've reduced 20 lines of clunky JavaScript into three lines of elegant, readable code. This new, concise JavaScript library radically simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages.
jQuery in Action, like jQuery itself, is a concise tool designed to make you a more efficient and effective web developer. In a short 300 pages, this book introduces you to the jQuery programming model and guides you through the major features and techniques you'll need to be productive immediately. The book anchors each new concept in the tasks you'll tackle in day-to-day web development and offers unique lab pages where you immediately put your jQuery knowledge to work.
There are dozens of JavaScript libraries available now, with major companies like Google, Yahoo and AOL open-sourcing their in-house tools. This book shows you how jQuery stacks up against other libraries and helps you navigate interaction with other tools and frameworks.
jQuery in Action offers a rich investigation of the up-and-coming jQuery library for client-side JavaScript. This book covers all major features and capabilities in a manner focused on getting the reader up and running with jQuery from the very first sections. Web Developers reading this book will gain a deep understanding of how to use jQuery to simplify their pages and lives, as well as learn the philosophy behind writing jQuery-enhanced pages.
Synopsis
None of the JavaScript libraries today has a more impressive track record than Google Closure, the tool suite used for Gmail, Google Docs, and Google Maps. Closure: The Definitive Guide has precisely what you need to get started with these tools, including valuable information not available publicly anywhere else.
Written by Michael Bolin -- a former Google engineer who made many contributions to Closure -- this guide explains the library's design and offers code examples that illustrate best practices. You'll also learn how to minify your JavaScript code with the compiler, and learn why the combination of the library and the compiler is what sets this toolkit apart from other JavaScript libraries.
- Discover several ways to use the compiler as part of your build process
- Learn about Closure type expressions, primitives, and common utilities
- Understand how classes and class-based-inheritance are emulated in Closure
- Get the best performance from Closure by learning about event management
- Learn the life-cycle of a UI component
- Get best practices for using Closure Templates
- Test and debug your JavaScript code
Synopsis
None of the JavaScript libraries today has a more impressive track record than Google Closure, the tool suite used for Gmail, Google Docs, and Google Maps. This guide has what readers need to get started with these tools, including valuable information not available publicly anywhere else.
Synopsis
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
Synopsis
'This work, like jQuery itself, is a concise tool designed to make readers more efficient and effective Web developers. It introduces the jQuery programming model as well as the major features and techniques needed to be productive.\n
'
About the Author
Michael Bolin is a former Google engineer who spent his four years there working on Google Calendar, Google Tasks, and the Closure Compiler. As a frontend developer, he used the Closure Tools suite on a daily basis and made a number of contributions to it. His last project at Google was to open-source the Closure Compiler. He is a blogger, often writing about web development, and graduated with both Computer Science and Mathematics degrees from MIT.
Table of Contents
Foreword; Preface; My Experiences with Closure; Audience; ECMAScript Versus JavaScript; Using This Book; Conventions Used in This Book; Using Code Examples; Safari® 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;