Top Banner
Christian Heilmann – YDN Developer Evening, Madrid, Spain – September 2009 using yahoo services to build geo aware web products. Find, Mix and Show
112

Find,Mix And Show

Sep 12, 2014

Download

Business

An introductory talk to Placemaker, YUI and YQL given at the developer evening in Madrid, Spain.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Find,Mix And Show

Christian Heilmann – YDN Developer Evening, Madrid, Spain – September 2009

using yahoo

services to build

geo aware web

products.

Find, Mix and Show

Page 2: Find,Mix And Show

Today I am going to introduce to you three Yahoo products that answer three developer ques>ons.

Page 3: Find,Mix And Show

How do I make my content findable in a geographical context? (and why that maFers)

Page 4: Find,Mix And Show

How can I easily get informa>on from different resources and mix them?

Page 5: Find,Mix And Show

How can I display content in a predictable manner across all the browsers?

Page 6: Find,Mix And Show

First up: why geographical data maFers.

Page 7: Find,Mix And Show
Page 8: Find,Mix And Show

Searching by text doesn’t quite cut it.

htt

p:/

/ww

w.f

lick

r.co

m/p

ho

tos/

ain

et/8

6994

2883

/

Page 9: Find,Mix And Show

Disambigua>ng can be tough, which is why we built us a system for it.

Page 11: Find,Mix And Show

Free Text

URL

Places

References

Page 12: Find,Mix And Show

First we take Manhattan, and then we take Berlin.

Page 13: Find,Mix And Show

Calling Placemakerhttp://wherein.yahooapis.com/v1/document

documentContent=First+we+take+Manhattan+and+then+we+take+Berlin. documentType=text/plain appid=my_appid

Page 14: Find,Mix And Show

Parameters

inputLanguagefr-CA,de-DE... outputTypexml or RSSdocumentContenttext to analysedocumentTitleadditional title

documentURLurl to analyzedocumentTypeMIME type of docautoDisambiguateremove duplicatesfocusWoeidfilter around a woeid

appid - nothing happens without it!

Page 15: Find,Mix And Show

First we take Manhattan, and then we take Berlin.

Page 16: Find,Mix And Show

First we take Manhattan, and then we take Berlin.

Page 17: Find,Mix And Show
Page 18: Find,Mix And Show
Page 19: Find,Mix And Show

Working with Placemaker results

Page 20: Find,Mix And Show

Places

Page 21: Find,Mix And Show

References

Page 22: Find,Mix And Show

Using this you can build cool liFle apps.

Page 23: Find,Mix And Show

Yahoo News Maphttp://isithackday.com/hacks/placemaker/map.php

Page 24: Find,Mix And Show

TweetLoca>onshttp://isithackday.com/hacks/placemaker/tweet-locations.php

Page 25: Find,Mix And Show

Geo this! (Greasemonkey)http://icanhaz.com/geothis

Page 26: Find,Mix And Show

Collaborationhttp://icant.co.uk/geomaker/GeoMaker

Page 27: Find,Mix And Show
Page 28: Find,Mix And Show
Page 31: Find,Mix And Show

Annoying things

Page 32: Find,Mix And Show

50,000 bytes

Page 33: Find,Mix And Show

The broken web

Page 34: Find,Mix And Show

POST vs. GET

Page 35: Find,Mix And Show

!JSON

Page 36: Find,Mix And Show

Places vs. References

Page 37: Find,Mix And Show

How can you fix all this?

Page 38: Find,Mix And Show

YQL to fix the web.

Page 39: Find,Mix And Show
Page 40: Find,Mix And Show
Page 41: Find,Mix And Show
Page 42: Find,Mix And Show

Connec>ng places and references

Page 44: Find,Mix And Show
Page 45: Find,Mix And Show
Page 46: Find,Mix And Show
Page 47: Find,Mix And Show
Page 48: Find,Mix And Show
Page 49: Find,Mix And Show

YQL open table for GET and JSON

Page 50: Find,Mix And Show

Good news, everyone!

Page 52: Find,Mix And Show
Page 53: Find,Mix And Show
Page 54: Find,Mix And Show

YQL can help you with any data on the web.

Page 55: Find,Mix And Show

The web of data.

Page 56: Find,Mix And Show

CMS

Page 57: Find,Mix And Show

CMS

Tags, Comments, Connections, Embeds

Page 58: Find,Mix And Show

The Yahoo Query Language, or short YQL is a unified interface language to the web.

http://developer.yahoo.com/yql/

Page 59: Find,Mix And Show

select {what} from {source} where {conditions} | {filters}

Page 61: Find,Mix And Show

For example:

select * from geo.places where text='london,uk'

Page 62: Find,Mix And Show
Page 63: Find,Mix And Show
Page 64: Find,Mix And Show

Get only the where on earth ID

select woeid from geo.places where text='london,uk'

Page 65: Find,Mix And Show

Then mix:

select id from flickr.photos.search where woe_id in (select woeid from geo.places where text='london,uk') and license=4

Page 66: Find,Mix And Show

Then mix:

select id from flickr.photos.search where woe_id in (select woeid from geo.places where text='london,uk') and license=4

Page 67: Find,Mix And Show

And get all the info...

select * from flickr.photos.info where photo_id in (select id from flickr.photos.search where woe_id in (select woeid from geo.places where text='london,uk') and license=4)

Page 68: Find,Mix And Show
Page 69: Find,Mix And Show
Page 70: Find,Mix And Show
Page 71: Find,Mix And Show
Page 72: Find,Mix And Show

http://isithackday.com/hacks/cantine/index.php?loc=covent+garden

Display the results in a few lines...

http://isithackday.com/hacks/ajaxexperience/flickrgeophotos.html

Page 73: Find,Mix And Show

Learn YQL by doing

http://developer.yahoo.com/yql/console/

Page 74: Find,Mix And Show
Page 75: Find,Mix And Show
Page 76: Find,Mix And Show
Page 77: Find,Mix And Show
Page 78: Find,Mix And Show
Page 79: Find,Mix And Show
Page 80: Find,Mix And Show
Page 81: Find,Mix And Show

Any data will do...

select * from

atomcsvfeedhtmljsonmicroformatsrssxml

Page 82: Find,Mix And Show

Any data will do...

http://www.dcs.gla.ac.uk/~joy/fun/jokes/TV.html

Page 84: Find,Mix And Show

Another thing...select server,secret,farm,id, urls.url,location,title,owner,description from flickr.photos.info where photo_id in ( select id from flickr.photos.search where woe_id in ( select match.place.woeId from geo.placemaker where documentContent in ( select div from html where url="http://wait-till-i.com" and xpath="//*[@id='content']" ) and documentType="text/html" ) and license=4)

Page 85: Find,Mix And Show
Page 86: Find,Mix And Show
Page 88: Find,Mix And Show
Page 89: Find,Mix And Show
Page 90: Find,Mix And Show
Page 92: Find,Mix And Show
Page 94: Find,Mix And Show

http://github.com/codepo8/MultiTweet/tree/masterhttp://www.betavine.net/bvportal/resources/widgets/research

Page 95: Find,Mix And Show

What the widget packager is for the mobile, YUI is for the web.

Page 96: Find,Mix And Show

The web is a total mess!

Page 97: Find,Mix And Show

In order to work with the web you need to clean it up and make it predictable.

Page 101: Find,Mix And Show
Page 102: Find,Mix And Show

Build a CSS layout that works

http://developer.yahoo.com/yui/grids/builder/

Page 103: Find,Mix And Show

http://isithackday.com/hacks/cantine/index.php?loc=covent+garden

http://isithackday.com/hacks/cantine/

Use already exis>ng widgets

Page 106: Find,Mix And Show
Page 107: Find,Mix And Show
Page 108: Find,Mix And Show
Page 111: Find,Mix And Show

The elevator li^ pitchYUI  is  the  system  that  Yahoo  uses  to  build  its web sites. It  is constantly tested to work for the largest  amount  of  users,  free,  open  source  and covers everything from design paFerns to out‐of‐the‐box widgets.  It  is modular and  you  can  use only  what  you  need.  You  can  either  host  it yourself  or  get  it  from a network  of distributed servers.

Page 112: Find,Mix And Show

Christian Heilmann

http://wait-till-i.com

http://developer-evangelism.com

http://twitter.com/codepo8