AJAX Made Easy - Learn AJAX

AJAX Categories

 

Latest AJAX Articles

AJAX Home AJAX-Tips

Reverse Ajax Technique

Author: admin | Published: 21st Apr 2008 | Read: 293 times | Add Comment
Filed in: AJAX Tips



Ajax based applications and websites have the ability to update specific parts of the webpage without changing the whole content. Using JavaScript as the language for development, developers are able to send information to the server-side faster with lesser bandwidth.


But still Ajax is just like most web development application. The connection from the server to client and vice versa has to be completed before another request could be done. Developers have found a work-around this situation by installing timer in some functions to delay its execution, but it still has to wait for the first queued function to complete before it starts another function.


There are certain scenarios on the other hand, where constant information is required. A single completion of transaction is just not enough for some business settings. Take for example; a customer management application that gives real-time updates of the actions made by users in a website.


If a single function or flow of communication to the client side is stalled, the rest of the functions will not be seen. A faster and smarter data flow has to be implemented.


From this need, developers have coined another technique of web-development called “Reverse Ajax.” This type of web and application development is almost the same as its original counterpart but with a twist: instead of a single flow of request from the client to the server, the server takes it further by pushing additional information and functions to the client – thus the name “Reverse Ajax”.


There are three popular names that Reverse Ajax is also known each of them has their own uniqueness that could be used by developers in different scenarios:


Polling – It is a straightforward Reverse Ajax. When developers use polling, they let the browsers constantly check on the server for updates of information and display them in the UI if they found one.


Piggyback Technique – A very smart way of using Reverse Ajax. This technique does not update the client side immediately when it has brand new updates. Just like Ajax, it waits for input from the user or from the set function established by the developer.


The difference of this technique however, lies in its answer. Aside from getting the straight answer from the server, the server sends in the information requested and more – it could either be information or an option of functions that the user might find useful. The additional information sent by the server has earned the moniker “Piggyback Technique”.


Comet – The resurrection of the old technique with a twist. Using the simple Http, Comet allows developers to open the communication from the client to the server permanently. But it does not open up on its own; the server has to wait for the user to request for the information.


Upon request, the server that uses the Comet technique answers the information in a slower manner so that the lines should be remained open for additional information to follow through.  Reverse Ajax has certainly pushed the boundaries for web development. With these techniques, real-time and fast information is possible from the server – all at the convenience from a browser.






Next: Speed up Ajax using JSMin in JavaScript



Post Comment


You need to Login to post your comment...

Click here to login

Title:
 
Comment:



Daily Email Updates

AJAX Updates delivered directly to your Inbox...

Enter your email address:

Latest AJAXwith Updates
 

Related AJAX Articles

 » Degradable Ajax
 » Reducing Code Size of Ajax Applications
 » Google Hosting Ajax Libraries
 » Three Powerful Profilers for Ajax
 » Optimizing Files for Ajax
 » AFLAX - A Lightweight Ajax Framework with Flash
 » Porting MySQL Data to Ajax
 » Debug your Ajax Application Easily
 » Ajax and Iphone 2.0
 » Periodic Refresh in an Ajax Based Application

Popular AJAX Articles