The user then knows to wait or move onto some other part
of the page to wait for the interaction to complete.
CHAPTER 5 n AJAX AND DATA EXCHANGE 103
Figure 5-4. A variety of the indicators available at www.napyfab.com/ajax-indicators
Failure
As much as you might not like to admit it, sometimes things go wrong. So it??™s best to plan for it
right from the get-go. Ask these questions:
??? What happens if the request times out? How long should you wait?
??? What happens when the data you get back isn??™t what was expected?
??? What happens when multiple requests are made? (Especially if they come back in a different
order from what was requested!)
You??™ll take a look at each of these questions and integrate solutions into a reusable library.
Storyboarding
When planning an Ajax-driven application, there are a number of interaction points. Yahoo!
refers to them as interesting moments. Figure 5-5 shows a portion of the storyboard matrix
that Yahoo! provides specifically for drag-and-drop functionality. I recommend that you have
something similar to plan for the interesting moments in your application.
CHAPTER 5 n AJAX AND DATA EXCHANGE 104
Figure 5-5. Yahoo! storyboard matrix available at http://developer.yahoo.com/yui/dragdrop/
#storyboard
The Yahoo! implementation uses a grid with objects on the left and events along the top.
Alternatively, I like to develop a flowchart that demonstrates the interactions that I might run
into.
Pages:
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169