Reengineering the Mashup
The most significant reengineering is for the tabs interface. In earlier chapters, we explored the ability to provide a nonscript interface that can then be converted into tabbed pages when scripting is enabled. We can do all of this using CSS and a minimum of JavaScript.
Once the tab conversion is finished, the next step is to provide a server-side interface to all of the services except for the Google Maps. We want the same application to provide services for a nonscript-based server-driven application and the JavaScript-based Ajax client. Google Maps is not something that will convert cleanly to a nonscript interface. What we can do with it is use the location to create a link to the Google Maps, and then the user accessing the page can decide whether he wants to turn on scripting for Google Maps. Or we could use the location to create a link to Google, Yahoo! maps, or even just print out the longitude and latitude.
Just like in previous chapters, the nonscript version will be generated by server-side processes, which also provide the permanent link for each "page." To make this work, the "on-demand" nature of the Flickr-to-Technorati tag connection either has to be completely supported for all Flickr tags, or just the link to Technorati provided, or the posts opened in a separate page. In this case, since we're doing a mashup, the application generates links for all posts by the Flickr tag. In the Ajax application, the on-demand nature of the application ...
Get Adding Ajax 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.