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 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.