AJAX - The Complete Reference

(avery) #1

336 Part II: Developing an Ajax Library^


Ajax applications often appear faster because of the reduction in size of data
transmission coupled with the limited amount of screen redraw needed.

An Ajax-style application should be more pleasing to users when properly
implemented. However, such applications do have interface considerations and challenges
that should not be approached lightly. Designers should adhere to the following basic
premises when building Ajax applications:


  • Deliver on the implicit promise of speed.

  • Keep users informed and aware of network and data activity.

  • Provide richness and interactivity like a desktop application.

  • Encourage the discovery and use of any new rich interface conventions adopted.


We discuss each of these points briefly here and expand upon them throughout the
chapter with examples and code.
To end users, the greatest benefit of Ajax is its raw speed. Yet, when interacting with an
Ajax application, users will not distinguish between different sources of improved speed.
Implied speed from a direct manipulation interface such as a drag-and-drop or the
increased speed from less data delivery is all the same to the end user. In fact, very often
direct manipulation interface characteristics found in many Ajax applications such as click-
to-edit and drag-and-drop may not even immediately trigger network activity. In such
cases, this wouldn’t qualify as Ajax in a strict sense, but for an end user the immediacy of
such facilities is likely more important than how data is moved around behind the scenes,
and thus we cover them in this chapter.
Focusing on the stricter sense of Ajax, the asynchronous data communication, there are
important interface implications to address. Traditional Web applications have obvious and
known moments of communication between page loads. Users are relatively well informed
of network activity from the browser and have been conditioned over time to expect the
possibility of communication failure due to broken links, network errors, and server
unavailability. However, in the case of Ajax applications where communications are handled
behind the scenes and not necessarily at predictable moments from the user’s perspective,
network failure might produce a sense of application fragility and frustration. As shown in
Chapter 6, network problems can and do happen, and Ajax developers should take many
steps to mitigate failures and inform the user about the status of operations, well beyond
showing a simple animated GIF of a spinning circle.
Moving from full page updates to partial page updates in an Ajax application is certainly
a desirable change, but even such a welcome improvement can have its caveats, especially if
Free download pdf