11. FBJS, Mock AJAX, and Flash

So far, we spent a great deal of time on server-side PHP that comprises Facebook applications. However, nearly every web application today uses at least some JavaScript for client-side logic and validation. For Facebook applications, the more logic and processing that can be offloaded to the user’s machine, the better. Why? First, client-side processing is free. JavaScript executes within the user’s browser on his local machine. Although hosting is undoubtedly cheaper than ever, it can still quickly get expensive if an application suddenly explodes in popularity or you host several popular applications on a single server. Secondly, it decreases application response time when code can execute locally without the ...

Get Essential Facebook® Development: Build Successful Applications for the Facebook Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.