Google's Feed API allows developers to circumvent the same-origin policy—a security mechanism designed to prevent JavaScript code from accessing content associated with a web page from a different domain—without having to manually implement complex server-side proxy mechanisms. The Feed API transparently leverages Google's server-side FeedFetcher, the RSS capture and cache mechanism used by Google Reader.
In order to use the Google Feed API, developers will need to sign up for a special API key that is tied to a specific URL. For instance, if a developer registers a key for http://mysite.com/mydirectory, that key can only be used in pages that are in that directory or its subdirectories. Developers will have to register additional keys for web pages that are stored in other directories or domains.
In my own experimentation with the Google Feed API, I found the performance satisfactory. I initially had some trouble getting the API to retrieve more than four elements at a time, until some developers at Google pointed out that I was neglecting to use the setNumEntries method to increase the maximum number of items. After fixing my test code, I had no problems using the Feed API to retrieve XML and JSON. The Google Feed API is a useful and effective tool for client-side Web 2.0 application development, but the key registration limitations seem like an inconvenience that could hinder adoption.
Source :: http://arstechnica.com/
No comments:
Post a Comment