SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 115 | Next

Raymond Yee

"Pro Web 2.0 Mashups: Remixing Data and Web Services"

flickr.com/cameras/canon/powershot_sd600/
CHAPTER 2 ?–  UNCOVERING THE MASHUP POTENTIAL OF WEB SITES 46
The Mashup-by-URL-Templating-and-Embedding
Pattern
Let??™s nowapply Flickr??™s URL language to make a simple mashup with Flickr. In this section, I??™ll show
how to create a simple example of what I call the Mashup-by-URL-Templating-and-Embedding
pattern. Specifically, I connect Flickr archives and aWordPress weblog by virtue of translating
URLs; an HTML page takes a given year and month and displays my Flickr photos along with
the entries from the weblog for this book (http://blog.mashupguide.net). The mashup works
because both the Flickr archives and the entries for the weblog are addressable by year and
month. For Flickr, recall the following URL template for the archives:
http://www.flickr.com/photos/{user-id}/archives/{date-taken-or-posted}/
{year}/{month}/{archive-view}
For example:
http://www.flickr.com/photos/raymondyee/archives/date-taken/2007/06/calendar/
The weblog has URLs for posts by year and month (if posts from those dates exist):
http://blog.mashupguide.net/{year}/{month}
For example:
http://blog.mashupguide.net/2007/06/
The mashup takes the year and month from the user and loads two iframes corresponding
to the Flickr photos and Mashupguide.net entries for the month by constructing the
URLs for the year and month:7


Pages:
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127