Essentials of Javascript - Cultural View
Essentials of Javascript - Cultural View
Essentials of Javascript - Cultural View
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
John Resig 123<br />
External links<br />
• John Resig - About Me [10]<br />
• John Resig: JavaScript's Chuck Norris [11]<br />
References<br />
[1] http://ejohn.org<br />
[2] http://ejohn.org/blog/<br />
[3] http://www.infoworld.com/article/07/10/04/Code-library-aims-to-fuel-easier-JavaScript-handling_1.html<br />
[4] http://www.rit.edu/alumni/ihf/inductee.php?inductee=10<br />
[5] http://ejohn.org/blog/tags/extensions/<br />
[6] http://ejohn.org/blog/new-processingjs-and-sizzlejs-sites/<br />
[7] http://www.webpronews.com/topnews/2005/07/11/google-maps-address-hack<br />
[8] http://www.ejohn.org/blog/<br />
[9] http://twitter.com/jeresig/statuses/1090013257<br />
[10] http://ejohn.org/about/<br />
[11] http://benalman.com/news/2009/12/john-resig-javascripts-chuck-norris/<br />
• Presentation on JavaScript & jQuery @ NEU ACM (http://video.google.com/<br />
videoplay?docid=-7485992465859932389)<br />
Reverse Ajax<br />
Reverse Ajax refers to an Ajax design pattern that uses long-lived HTTP connections to enable low-latency<br />
communication between a web server and a browser. Basically it is a way <strong>of</strong> sending data from client to server and a<br />
[1] [2]<br />
mechanism for pushing server data back to the browser.<br />
This server–client communication takes one <strong>of</strong> two forms:<br />
• Client polling: the client repeatedly queries (polls) the server and waits for an answer.<br />
• Server pushing: a connection between a server and client is kept open and the server sends data when available.<br />
Reverse Ajax describes the implementation <strong>of</strong> either <strong>of</strong> these models, or a combination <strong>of</strong> both. The design pattern is<br />
also known as Ajax Push, Full Duplex Ajax and Streaming Ajax.<br />
Examples<br />
The following is a simple example. Imagine we have 2 clients and 1 server, and client1 wants to send the message<br />
"hello" to every other client.<br />
With traditional Ajax (polling):<br />
• client1 sends the message "hello"<br />
• server receives the message "hello"<br />
• client2 polls the server<br />
• client2 receives the message "hello"<br />
• client1 polls the server<br />
• client1 receives the message "hello"<br />
With reverse Ajax (pushing):<br />
• client1 sends the message "hello"<br />
• server receives the message "hello"<br />
• server sends the message "hello" to all clients<br />
Less traffic is generated with Reverse Ajax and messages are transferred with less delay (low-latency).