In the Ajax world, the flow of events is slightly more complex, but still essentially the
same, as you can see in Figure 3-9.
In this diagram, you can see the first three poll events occur without any user intervention;
the polling client, or Ajax engine, is initiating the request independent of anything the
user may be doing. Also note that those first three poll events do not make calls to the browser
UI when the response is received. This indicates cases where no update was required because
no new data was present.
This is one of the two active reverse Ajax methods because there is an automatic action of
some sort involved in getting updates from the server to the client. The other active method is
called Comet.
CHAPTER 3 n ADVANCED DWR 111
Figure 3-9. The sequence of events in the polling technique
Comet
Comet, the second active reverse Ajax method, is of course so named so as to be a counterpart
cleaning agent to Ajax (give that a second to process if it didn??™t make sense, and if you still
don??™t get it, take a break, head on down to your local supermarket, and look through the
products in the cleaning supplies aisle . . . although it may not be something found in every
country, as my technical reviewer pointed out, so I??™ll save you the time and tell you that Comet
is a cleaning product sold in the United States that comes in a distinctive polished green can),
and it is adequately, if a little confusingly, described in Figure 3-10.
Pages:
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229