SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Photos Around You
http://bit.ly/photos-around-you


Eric Ferraiuolo                      Twitter: @ericf
                                  Blog: 925html.com
Photos Around You is…
• Written in JavaScript
• Leveraging YUI 3.1,YQL, & Flickr
• Determining the user’s location
• Finding geo-tagged photos on Flickr
• Optimizing thumbnails using data-URIs
• Building a UI to view photos
YUI 3
         Yahoo! User Interface Library



• Yahoo!’s next-generation JavaScript library
• Powers the new Yahoo! homepage
• Current version: 3.1.0
• Open Source – on GitHub
 • http://github.com/yui/yui3/
YUI 3 – Cont.
•   Modular                 •   Selector driven

•   Self-aware Dependency   •   Performant
    Management
                            •   Custom Events
•   YUI().use() only
    what you need           •   Component and Widget
                                Infrastructure
•   YUI 2 in 3
                            •   Custom Modules
•   Gallery Modules
YUI 3 Modules Used
•     node                  •   gallery-jsonp

•     overlay               •   gallery-yql

•     substitute            •   gallery-markout

YUI().use('node', 'overlay', 'substitute',
'gallery-jsonp', 'gallery-yql', 'gallery-
markout', function(Y){

      // Everything is ready!

});
YQL
              Yahoo! Query Language

•   SELECT * FROM Internet
    SELECT * FROM flickr.photos.search WHERE
    text="cat" LIMIT 10

•   SQL-like syntax
•   HTTP GET ➞ JSON(P)
•   Yahoo!’s pipes are bigger than yours
•   Open Data Tables: Plugin your own web
    services http://datatables.org/
YQL – Cont.
• Supports: SELECT, INSERT, UPDATE,
  DELETE

• JOIN web services together:
  SELECT * FROM upcoming.events WHERE woeid
  IN (SELECT woeid FROM geo.places WHERE
  text="Boston, MA")

• Execute JavaScript on YQL’s Servers
Using YQL with YUI 3

var q = 'SELECT * FROM flickr.photos.search '+
        'WHERE text="cat"';

new Y.yql(q, function(r){

      r.query.results // Results as JSON

});
Flickr


…is Photos
User’s Location

• Need user’s location, client-side
• Feature detect W3C Geolocation API
• Fallback to IP-based
• Gather info about location
User’s Location
            via W3C Geolocation API

• Returns Lat/Lng
• Black-box implementation
• Firefox, iPhone, iPad, Android
if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(
         locFromPos, locFromIP
    );
} else {
    locFromIP();
}
User’s Location
              via IP-based Lookup

• Less accurate
• All browsers
• Get user’s IP in JavaScript?
getIP = function (callback) {
    Y.jsonp('http://jsonip.appspot.com/',
    function(data){
        callback(data.ip);
    });
};
User’s Location
          Gathering Info About Location


 • WOEID (Where On Earth IDentifer)
 • Locality (e.g. Boston, MA)
YQL Query using Lat/Lon from Geolocation API
SELECT * FROM geo.places WHERE woeid IN (SELECT
place.woeid FROM flickr.places WHERE lat={lat}
AND lon={lon})



                     Credit: Christian Heilmann (@codepo8)
User’s Location
          Gathering Info About Location


 • WOEID (Where On Earth IDentifer)
 • Locality (e.g. Boston, MA)
YQL Query using IP
SELECT * FROM geo.places WHERE woeid IN (SELECT
place.woeid FROM flickr.places WHERE (lat, lon)
IN (SELECT Latitude, Longitude FROM ip.location
WHERE ip="{ip}"))


                     Credit: Christian Heilmann (@codepo8)
User’s Location
          Gathering Info About Location



            Lat-Lon/IP          Lat-Lon/IP

                                WOEID

Browser                   YQL                Y! Geo
                                Places API

             Loc Info            Loc Info
               Internet
Geo-Tagged Flickr Photos
           Search Flickr via YQL Query


• Paged result-sets
• Use WOEID of the user’s location
• Sort-by “interestingness”
SELECT * FROM flickr.photos.search({start},
{num}) WHERE woe_id="{woeid}" AND
radius_units="mi" AND sort="interestingness-
desc" AND extras="path_alias"
Geo-Tagged Flickr Photos
          Search Flickr via YQL Query




          Photo Data          Search API
Browser                 YQL                Flickr
             Internet
Thumbnail Data-URIs
          Too Many HTTP Requests


               Image Requests




Browser                            Flickr
                    Internet
Thumbnail Data-URIs
    Delegate YQL to Download Thumbnails


                              Images



          Data URIs
Browser                 YQL            Flickr
             Internet
Thumbnail Data-URIs

•   Removed HTTP image requests to Flickr

•   YQL GETs Flickr images, Batches Data URIs

•   Reduced HTTP requests 10x

    •   1 YQL Request = 10 Image Data URIs
Photos UI

• Loading indicators between YQL requests
• Render grid of thumbnails
• Use photo data to construct Overlay
• ‘More’ Button to fetch additional photos
Photo UI – Cont.

• Event Delegation
 • 1 Event Handler for all thumbnail clicks
• Heavy use of CSS3
• Tested with: IE 8, Firefox 3.5, Safari 4,
  Chrome 4, iPhone, iPad
Questions?

•   http://925html.com/code/photos-around-you/
•   Eric Ferraiuolo
    •   http://925html.com
    •   @ericf on Twitter
Photo Credits
•   http://www.flickr.com/photos/pearbiter/2075091856

•   http://www.flickr.com/photos/leecullivan/399317018

•   http://www.flickr.com/photos/beantown/3085045889

•   http://www.flickr.com/photos/roncaglia/2481739143

•   http://www.flickr.com/photos/28625089@N03/2923851272

•   http://www.flickr.com/photos/colonnade/859769177

•   http://www.flickr.com/photos/emdurso/402898976

•   http://www.flickr.com/photos/riacale/1736524005

•   http://www.flickr.com/photos/31332713@N04/3086715585

•   http://www.flickr.com/photos/gershamabob/78717025

Contenu connexe

Similaire à Photos Around You

Query the web with YQL
Query the web with YQLQuery the web with YQL
Query the web with YQLramace
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geomambo91
 
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門潤一 加藤
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信Makoto Kato
 
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012Saurabh Sahni
 
YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011Saurabh Sahni
 
Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware appsAnshu Prateek
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityMark Billinghurst
 

Similaire à Photos Around You (20)

Query the web with YQL
Query the web with YQLQuery the web with YQL
Query the web with YQL
 
YQL & Yahoo! Apis
YQL & Yahoo! ApisYQL & Yahoo! Apis
YQL & Yahoo! Apis
 
Yql ans geo
Yql ans geoYql ans geo
Yql ans geo
 
YQL Case Study
YQL Case StudyYQL Case Study
YQL Case Study
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geo
 
YQL - HackU IIT Madras 2012
YQL - HackU IIT Madras 2012YQL - HackU IIT Madras 2012
YQL - HackU IIT Madras 2012
 
Yql hacku iitd_2012
Yql hacku iitd_2012Yql hacku iitd_2012
Yql hacku iitd_2012
 
BREN_ADMIN_20100729_001
BREN_ADMIN_20100729_001BREN_ADMIN_20100729_001
BREN_ADMIN_20100729_001
 
Hacking location aware hacks HackU IIT Bombay
Hacking location aware hacks HackU IIT BombayHacking location aware hacks HackU IIT Bombay
Hacking location aware hacks HackU IIT Bombay
 
Locate your hacks
Locate your hacksLocate your hacks
Locate your hacks
 
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
 
Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware apps
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信
 
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
YQL: Hacking on steroids - Yahoo! Open Hack Day 2012
 
Hacking location aware apps
Hacking location aware appsHacking location aware apps
Hacking location aware apps
 
YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011
 
Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware apps
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with Unity
 
Mobile AR Tutorial
Mobile AR TutorialMobile AR Tutorial
Mobile AR Tutorial
 
Widget Workshop
Widget WorkshopWidget Workshop
Widget Workshop
 

Dernier

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxMasterG
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfAnubhavMangla3
 

Dernier (20)

Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 

Photos Around You

  • 1. Photos Around You http://bit.ly/photos-around-you Eric Ferraiuolo Twitter: @ericf Blog: 925html.com
  • 2. Photos Around You is… • Written in JavaScript • Leveraging YUI 3.1,YQL, & Flickr • Determining the user’s location • Finding geo-tagged photos on Flickr • Optimizing thumbnails using data-URIs • Building a UI to view photos
  • 3.
  • 4. YUI 3 Yahoo! User Interface Library • Yahoo!’s next-generation JavaScript library • Powers the new Yahoo! homepage • Current version: 3.1.0 • Open Source – on GitHub • http://github.com/yui/yui3/
  • 5. YUI 3 – Cont. • Modular • Selector driven • Self-aware Dependency • Performant Management • Custom Events • YUI().use() only what you need • Component and Widget Infrastructure • YUI 2 in 3 • Custom Modules • Gallery Modules
  • 6. YUI 3 Modules Used • node • gallery-jsonp • overlay • gallery-yql • substitute • gallery-markout YUI().use('node', 'overlay', 'substitute', 'gallery-jsonp', 'gallery-yql', 'gallery- markout', function(Y){ // Everything is ready! });
  • 7. YQL Yahoo! Query Language • SELECT * FROM Internet SELECT * FROM flickr.photos.search WHERE text="cat" LIMIT 10 • SQL-like syntax • HTTP GET ➞ JSON(P) • Yahoo!’s pipes are bigger than yours • Open Data Tables: Plugin your own web services http://datatables.org/
  • 8. YQL – Cont. • Supports: SELECT, INSERT, UPDATE, DELETE • JOIN web services together: SELECT * FROM upcoming.events WHERE woeid IN (SELECT woeid FROM geo.places WHERE text="Boston, MA") • Execute JavaScript on YQL’s Servers
  • 9. Using YQL with YUI 3 var q = 'SELECT * FROM flickr.photos.search '+ 'WHERE text="cat"'; new Y.yql(q, function(r){ r.query.results // Results as JSON });
  • 11. User’s Location • Need user’s location, client-side • Feature detect W3C Geolocation API • Fallback to IP-based • Gather info about location
  • 12. User’s Location via W3C Geolocation API • Returns Lat/Lng • Black-box implementation • Firefox, iPhone, iPad, Android if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( locFromPos, locFromIP ); } else { locFromIP(); }
  • 13. User’s Location via IP-based Lookup • Less accurate • All browsers • Get user’s IP in JavaScript? getIP = function (callback) { Y.jsonp('http://jsonip.appspot.com/', function(data){ callback(data.ip); }); };
  • 14. User’s Location Gathering Info About Location • WOEID (Where On Earth IDentifer) • Locality (e.g. Boston, MA) YQL Query using Lat/Lon from Geolocation API SELECT * FROM geo.places WHERE woeid IN (SELECT place.woeid FROM flickr.places WHERE lat={lat} AND lon={lon}) Credit: Christian Heilmann (@codepo8)
  • 15. User’s Location Gathering Info About Location • WOEID (Where On Earth IDentifer) • Locality (e.g. Boston, MA) YQL Query using IP SELECT * FROM geo.places WHERE woeid IN (SELECT place.woeid FROM flickr.places WHERE (lat, lon) IN (SELECT Latitude, Longitude FROM ip.location WHERE ip="{ip}")) Credit: Christian Heilmann (@codepo8)
  • 16. User’s Location Gathering Info About Location Lat-Lon/IP Lat-Lon/IP WOEID Browser YQL Y! Geo Places API Loc Info Loc Info Internet
  • 17. Geo-Tagged Flickr Photos Search Flickr via YQL Query • Paged result-sets • Use WOEID of the user’s location • Sort-by “interestingness” SELECT * FROM flickr.photos.search({start}, {num}) WHERE woe_id="{woeid}" AND radius_units="mi" AND sort="interestingness- desc" AND extras="path_alias"
  • 18. Geo-Tagged Flickr Photos Search Flickr via YQL Query Photo Data Search API Browser YQL Flickr Internet
  • 19. Thumbnail Data-URIs Too Many HTTP Requests Image Requests Browser Flickr Internet
  • 20. Thumbnail Data-URIs Delegate YQL to Download Thumbnails Images Data URIs Browser YQL Flickr Internet
  • 21. Thumbnail Data-URIs • Removed HTTP image requests to Flickr • YQL GETs Flickr images, Batches Data URIs • Reduced HTTP requests 10x • 1 YQL Request = 10 Image Data URIs
  • 22. Photos UI • Loading indicators between YQL requests • Render grid of thumbnails • Use photo data to construct Overlay • ‘More’ Button to fetch additional photos
  • 23. Photo UI – Cont. • Event Delegation • 1 Event Handler for all thumbnail clicks • Heavy use of CSS3 • Tested with: IE 8, Firefox 3.5, Safari 4, Chrome 4, iPhone, iPad
  • 24. Questions? • http://925html.com/code/photos-around-you/ • Eric Ferraiuolo • http://925html.com • @ericf on Twitter
  • 25. Photo Credits • http://www.flickr.com/photos/pearbiter/2075091856 • http://www.flickr.com/photos/leecullivan/399317018 • http://www.flickr.com/photos/beantown/3085045889 • http://www.flickr.com/photos/roncaglia/2481739143 • http://www.flickr.com/photos/28625089@N03/2923851272 • http://www.flickr.com/photos/colonnade/859769177 • http://www.flickr.com/photos/emdurso/402898976 • http://www.flickr.com/photos/riacale/1736524005 • http://www.flickr.com/photos/31332713@N04/3086715585 • http://www.flickr.com/photos/gershamabob/78717025