![]() |
|
|
|
Tags Map
ajax application aspnet bad blog caching collin data expiry extend facebook fbjs function functiondata functionurl hosting javascript mvc net null obj object objondone october ondone onerror option plugin post query queue queued request requests response silverlight subscribe true url var view web wrapper Keyword Cloud Navigation Map |
AJAX Wrapper for Facebook JavaScriptAbstract: Collin Chung wrote an extension to the FBJS Ajax. This article demonstrates bow to use those new feature. Introducing fAjax, an AJAX wrapper for Facebook JavaScript. It features caching, simple throttling and queueing of requests (and responses).
About 2 weeks ago, I tried to implement browser-side caching for my Facebook app. I went through the Ajax Typeahead example, and abstracted the AJAX communications portion into a simple wrapper class. I isolated the caching and submission throttling functionalities from Tyson Malchow's code, and later, I added queues support, adapting from jQuery's Ajax Queue plugin. Like the plugin, the wrapper allows for both response synchronization and request queueing. The former fires all requests immediately but executes the responses in order, while the latter processes each request and response sequentially. |