Chapter 9. Building and Deploying High-Performance JavaScript Applications

Julien Lecomte

According to a 2007 study by Yahoo!’s Exceptional Performance team, 40%–60% of Yahoo!’s users have an empty cache experience, and about 20% of all page views are done with an empty cache (http://yuiblog.com/blog/2007/01/04/performance-research-part-2/). In addition, another more recent study by the Yahoo! Search team, which was independently confirmed by Steve Souders of Google, indicates that roughly 15% of the content delivered by large websites in the United States is served uncompressed.

These facts emphasize the need to make sure that JavaScript-based web applications are delivered as efficiently as possible. While part of that work is done during the design and development cycles, the build and deployment phase is also essential and often overlooked. If care is not taken during this crucial phase, the performance of your application will suffer, no matter how much effort you’ve put into making it faster.

The purpose of this chapter is to give you the necessary knowledge to efficiently assemble and deploy a JavaScript-based web application. A number of concepts are illustrated using Apache Ant, a Java-based build tool that has quickly become an industry standard for building applications for the Web. Toward the end of the chapter, a custom agile build tool written in PHP5 is presented as an example.

Apache Ant

Apache Ant (http://ant.apache.org/) is a tool for automating software build processes. ...

Get High Performance JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.