Chapter 9. Mashup Your Site

Adding Ajax to your site opens your site opens it up to a world of services, applications, and assorted and sundry widgets. Both Yahoo! and Google provide mapping services, Amazon external storage, imagery with Flickr, syndication feeds with Newsgator, and a host of metadata made available through XML, microformats, and the Resource Description Framework (RDF).

You could get carried away and end up with a site that tries to load the entire Internet into your sidebar, but if used wisely, these external services can be a real bonus for your web applications.

You can also, in turn, provide services from your site to other sites by providing widgets created specifically to take advantage of your services or data. Why would you want to? For the same reasons other sites provide their widgets for your use: to get your services in front of others, to sell or to share.

How much you can integrate with other services really depends on the service provider. Google manages all aspects of its mapping service, but provides a decent API that lets you show map locations, plot routes, and define the viewpoint window. However, it is a Google viewpoint window, and if the company decides to insert ads one day, you won’t have any say in the matter.

Other services, such as the del.icio.us tag API, provide access to limited raw data, but may impose restrictions on how you use the data—or how often, since several services only allow you to call an API using the same license so many ...

Get Adding Ajax now with O’Reilly online learning.

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