Prev | Current Page 216 | Next

Frank Zammetti

"Practical DWR 2 Projects"

In addition, two of them fall in the category of ???active??? reverse Ajax, while the third is
considered ???inactive??? reverse Ajax. Let??™s take a look at each and what DWR has to offer.
CHAPTER 3 n ADVANCED DWR 110
Figure 3-8. The basic sequence of events in the Ajax world
Polling
The polling technique is, strictly speaking, not specific to Ajax and has been around for quite
some time longer. This is the simplest form of ???server push,??? and you are no doubt already
aware of it, even if the term is unfamiliar.
Image a plain old web page, no Ajax or anything special. Imagine you use a refresh
tag to continually update the page every few seconds. This is polling in action! The client is
continually polling the server for changes and displaying the new information (technically it
displays whatever the server reports as the current information, which may or may not be new
as compared to what the user was seeing before the last poll event, but the appearance is that
new information is displayed while unchanged information is still displayed unchanged).
You can do the same thing with some simple JavaScript on a page that continually
refreshes the page. It??™s all the same thing, and it??™s all polling.


Pages:
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228