Description
If you're like most developers, you rely heavily on JavaScript to build interactive and quick-responding web applications. The problem is that all of those lines of JavaScript code can slow down your apps. This book reveals techniques and strategies to help you eliminate performance bottlenecks during development. You'll learn how to improve execution time, downloading, interaction with the DOM, page life cycle, and more.Yahoo! frontend engineer Nicholas C. Zakas and five other JavaScript experts -- Ross Harmes, Julien Lecomte, Steven Levithan, Stoyan Stefanov, and Matt Sweeney -- demonstrate optimal ways to load code onto a page, and offer programming tips to help your JavaScript run as efficiently and quickly as possible. You'll learn the best practices to build and deploy your files to a production environment, and tools that can help you find problems once your site goes live.
* Identify problem code and use faster alternatives to accomplish the same task
* Improve scripts by learning how JavaScript stores and accesses data
* Implement JavaScript code so that it doesn't slow down interaction with the DOM
* Use optimization techniques to improve runtime performance
* Learn ways to ensure the UI is responsive at all times
* Achieve faster client-server communication
* Use a build system to minify files, and HTTP compression to deliver them to the browser
CONTENTS:
Preface; The Internet Evolves; Why Optimization Is Necessary; Next-Generation JavaScript Engines; Performance Is Still a Concern; How This Book Is Organized; JavaScript Loading; Coding Technique; Deployment; Testing; Who This Book Is For; Conventions Used in This Book; Using Code Examples; Safari(R) Books Online; How to Contact Us; Acknowledgments; Chapter 1: Loading and Execution; 1.1 Script Positioning; 1.2 Grouping Scripts; 1.3 Nonblocking Scripts; 1.4 Summary; Chapter 2: Data Access; 2.1 Managing Scope; 2.2 Object Members; 2.3 Summary; Chapter 3: DOM Scripting; 3.1 DOM in the Browser World; 3.2 DOM Access and Modification; 3.3 Repaints and Reflows; 3.4 Event Delegation; 3.5 Summary; Chapter 4: Algorithms and Flow Control; 4.1 Loops; 4.2 Conditionals; 4.3 Recursion; 4.4 Summary; Chapter 5: Strings and Regular Expressions; 5.1 String Concatenation; 5.2 Regular Expression Optimization; 5.3 String Trimming; 5.4 Summary; Chapter 6: Responsive Interfaces; 6.1 The Browser UI Thread; 6.2 Yielding with Timers; 6.3 Web Workers; 6.4 Summary; Chapter 7: Ajax; 7.1 Data Transmission; 7.2 Data Formats; 7.3 Ajax Performance Guidelines; 7.4 Summary; Chapter 8: Programming Practices; 8.1 Avoid Double Evaluation; 8.2 Use Object/Array Literals; 8.3 Don’t Repeat Work; 8.4 Use the Fast Parts; 8.5 Summary; Chapter 9: Building and Deploying High-Performance JavaScript Applications; 9.1 Apache Ant; 9.2 Combining JavaScript Files; 9.3 Preprocessing JavaScript Files; 9.4 JavaScript Minification; 9.5 Buildtime Versus Runtime Build Processes; 9.6 JavaScript Compression; 9.7 Caching JavaScript Files; 9.8 Working Around Caching Issues; 9.9 Using a Content Delivery Network; 9.10 Deploying JavaScript Resources; 9.11 Agile JavaScript Build Process; 9.12 Summary; Chapter 10: Tools; 10.1 JavaScript Profiling; 10.2 YUI Profiler; 10.3 Anonymous Functions; 10.4 Firebug; 10.5 Internet Explorer Developer Tools; 10.6 Safari Web Inspector; 10.7 Chrome Developer Tools; 10.8 Script Blocking; 10.9 Page Speed; 10.10 Fiddler; 10.11 YSlow; 10.12 dynaTrace Ajax Edition; 10.13 Summary; Colophon;
Published
16 Apr 2010
Publisher
O'REILLY & ASSOCIATES
ISBN
9780596802790
Pages
209




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