AJAX - The Complete Reference

(avery) #1

PART II


Chapter 8: User Interface Design for Ajax 395


the DOM. An example of such custom tooltips is shown here and can be found at http://
ajaxref.com/ch8/tooltipcustom.html.

NNOT EOTE In both of these previewing pattern examples we hard-coded the summaries, though you
could certainly build a program that pulled out some summary of an item from a file or database
so the tooltips could be generated automatically from content.

Obviously, the idea of previewing is most beneficial for larger commitments such as
image downloads. This idea could be extended to show a thumbnail of an image in a list of
images before clicking to open up the full high-resolution version as demoed at http://
ajaxref.com/ch8/photoviewer.html and shown in Figure 8-16.
Previewing is in some sense a simple form of the next pattern of progressive loading.
Though previewing only provides two progressive levels of detail, the preview and the full
version, there is no reason we couldn’t go deeper than this with Ajax.

NNOT EOTE A related idea to content previewing would be to provide context-sensitive help balloons upon
rollover. We could of course populate such a structure using Ajax. However, given this is just a
variation of article previewing, we leave it to readers to explore this alternate use of the technology.

Progressive Loading


A tremendous advantage of Ajax over traditional Web application styles is that it can
continually load information in regard to user input. For example, imagine we had a very
large list of to-do items, say 5000 or more items. To download all of them would be
prohibitive, but we can easily download 50 or so to show the user. Besides download time,
we really wouldn’t want to overwhelm people who have such large to-do lists. They may
never finish anything. To deal with the monster list, as the user views the page, the next 50
Free download pdf