Find,Mix And Show

Post on 12-Sep-2014

5187 Views

Category:

Business

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

An introductory talk to Placemaker, YUI and YQL given at the developer evening in Madrid, Spain.

Transcript

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

using yahoo

services to build

geo aware web

products.

Find, Mix and Show

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

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

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

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

First up: why geographical data maFers.

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

/

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

Free Text

URL

Places

References

First we take Manhattan, and then we take Berlin.

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

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

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!

First we take Manhattan, and then we take Berlin.

First we take Manhattan, and then we take Berlin.

Working with Placemaker results

Places

References

Using this you can build cool liFle apps.

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

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

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

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

Annoying things

50,000 bytes

The broken web

POST vs. GET

!JSON

Places vs. References

How can you fix all this?

YQL to fix the web.

Connec>ng places and references

YQL open table for GET and JSON

Good news, everyone!

YQL can help you with any data on the web.

The web of data.

CMS

CMS

Tags, Comments, Connections, Embeds

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

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

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

For example:

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

Get only the where on earth ID

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

Then mix:

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

Then mix:

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

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)

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

Display the results in a few lines...

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

Learn YQL by doing

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

Any data will do...

select * from

atomcsvfeedhtmljsonmicroformatsrssxml

Any data will do...

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

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)

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

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

The web is a total mess!

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

Build a CSS layout that works

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

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

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

Use already exis>ng widgets

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.

top related