About Flickr's Public FeedBefore we start our application, let me tell you about Flickr's public feed. Basically its an URL, which, when accessed, gives back list of images. The URL contains 'tags' for which we want so get images in the query string. It is possible to specify multiple tags separated by commas. This feed can be forced to return data in JSON format by specifying 'format' in the query string. http://api.flickr.com/services/feeds/photos_public.gne?tags=mumbai&format=json The feed URL with tags and output format specified as JSON: http://api.flickr.com/services/feeds/photos_public.gne The feed URL: The second URL fetches results for tag 'Mumbai' and tells the service to give results in JSON format. More information on using the feed can be found here: http://www.flickr.com/services/feeds/docs/photos_public/ If you paste this URL in Firefox, you should see something like this:
Building basic 'Search' UI
<body> <p>Tags: <input id="txtTags" type="text" /><input id="btnSearch" type="button" value="Search" onclick="return btnSearch_onclick()" /><br /></p><hr /> <!--DIV serves as container to script tags !--> <div id="srcDiv"></div>
- A new URL pointing to Flickr's feed is constructed, which contains tags entered by the user.
- A new script tag is created with the above URL as the value of 'src' attribute.
- This script tag is dynamically inserted inside a placeholder, which triggers an AJAX request.
- Separates UI from data.
- Since UI is generated at client, this eases load on server the a bit.
- Designing AJAX based application is more painful than convention webapps.
- Can't bookmark !
- Not search engine friendly.
- Try pressing the 'Back' button on your browser ;-)
Copyright (c) 2007-2015 Ashish Patil . Please read FAQ for more details.