Skip to Main Content
Adding Ajax
book

Adding Ajax

by Shelley Powers
June 2007
Intermediate to advanced content levelIntermediate to advanced
400 pages
9h 52m
English
O'Reilly Media, Inc.
Content preview from Adding Ajax

Designing Ajax from the Ground Up

In some ways, adding Ajax to an existing site is much easier than developing an application with Ajax as a component from the beginning. First of all, you already have your script-free application versions, and you won't be tempted to skip this essential component.

After doing the preliminary development planning discussed in Chapter 1, and after you have a good idea of where you want to use Ajax (and why), you now have design issues related purely to the development process.

Packaging Your Functionality into Units

It's a given that we'll package our JavaScript into reusable libraries, but we don't think about packaging our CSS or our HTML, not to mention also packaging our server-side code. A framework takes care of much of this, but we also need to look at going beyond the framework and discovering how much functionality we can package into complete units, such as CSS, HTML, server-side framework, and Ajax/scripting. This is dictated by common sense, of course, because we can easily make our sites impossible to maintain in our efforts to reduce it all to the lowest common denominators.

For instance, rather than having the CSS for an entire site in one file, we could split it out into separate CSS files for individual effects, and then load each of the CSS files only when the page needs a particular effect. Of course, the more we do this, the more HTTP requests are made, so another approach is to manually merge the CSS for all the effects into one ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ajax: The Definitive Guide

Ajax: The Definitive Guide

Anthony T. Holdener III
Ajax Design Patterns

Ajax Design Patterns

Michael Mahemoff
Web Development with JavaScript and Ajax Illuminated

Web Development with JavaScript and Ajax Illuminated

Richard Allen, Kai Qian, Lixin Tao, Xiang Fu

Publisher Resources

ISBN: 9780596529369Supplemental ContentErrata Page