AJAX - The Complete Reference

(avery) #1

514 Part III: Advanced Topics


In the second version at http://ajaxref.com/ch10/mashupscripts.html, we pull our data
using a <script> call to Google and Yahoo and then combine the two.

The code for either example is more busy work than complex. Mash-up code mostly
involves fetching data in a variety of ways, translating data from one format to another, and
then combining the interesting items. Given the consistency of approach, a number of efforts
have been made to build visual mash-up creation tools. For example, http://pipes.yahoo.com,
as shown in Figure 10-7, is used to create a simple mash-up that reads a number of popular
Ajax news source sites and then provides a query mechanism against the stories.
While making mash-ups can be fun, we encourage you to look at mash-up making
systems or simply look at the list of existing efforts, as it is very likely the combination of
data or something quite similar has been done before.

Comet


For a more continuous connection to the server in order to keep the client up to date, an Ajax
application must rely on a polling mechanism to make requests to check status on the server at
regular intervals. This approach can be quite taxing on server and client alike. For irregularly
Free download pdf