64
YQL and YUI Building blocks for quick applica8ons Chris8an Heilmann, Yahoo internal talk, Sunnyvale, California, 02/02/2010

Building With YQL And YUI

Embed Size (px)

DESCRIPTION

An introductory talk how to build quick mashups and products by using YQL to get information of the Web and YUI to build the interface. By building on top of proven concepts and systems that are in use in large web sites and applications you have the time to concentrate on what you want to achieve with your application rather than making it work for browsers.

Citation preview

Page 1: Building With YQL And YUI

YQLandYUIBuildingblocksforquickapplica8ons

Chris8anHeilmann,Yahoointernaltalk,Sunnyvale,California,02/02/2010

Page 2: Building With YQL And YUI

Iamknowntobeabletoquicklybuildcooldemos.

Page 7: Building With YQL And YUI

hIp://icant.co.uk/goohoobi/index.php?research

Page 9: Building With YQL And YUI

ThereasonisthatIambuildingwiththingsthatwork.

Page 10: Building With YQL And YUI

Andthatgivesme8metoconcentrateontheimportantthings.

Page 11: Building With YQL And YUI

OnethingIamboredofiswri8ngCSSlayouts.

Page 12: Building With YQL And YUI

WhichiswhyIamusingaverysimplesolu8on.

Page 15: Building With YQL And YUI

ThereasonisthatIwanttosupportbrowsers‐notworkforthem.

Page 16: Building With YQL And YUI

I’dratherbeabletoupdateaCSSURIthanre‐writemyCSSwhenanewbrowsercomesaround.

Page 17: Building With YQL And YUI

Thingswespendfartoomuch8meon:

Hackstomakebrowserswork.Op8misingprematurely.Usingourpetlanguage/environment/libraryReadingbadlywriIentutorialsandincompletedocumenta8on.Usingbleedingedgeeffectsandinterfacesandthentryingtocreateafallbacksolu8on.Flashyeffects.

Page 18: Building With YQL And YUI

Whatwereallyshouldstartwithisthedata.

Page 19: Building With YQL And YUI

ThisiswhereAPIsandwebservicescomein.

Page 20: Building With YQL And YUI

TheissueisthatallofthesearewriIendifferently,expectdifferentauthen8ca8onandgivebackdifferentdata.

Page 22: Building With YQL And YUI

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

select{what}from{where}where{condi8ons}

Page 25: Building With YQL And YUI

Afewexamples...

select*fromflickr.photos.searchwheretext="donkey"

Page 26: Building With YQL And YUI

Afewexamples...

select*fromflickr.photos.searchwheretext="donkey"andlicense=4

Page 27: Building With YQL And YUI

Afewexamples...

select*fromcraigslist.searchwhereloca8on="s`ay"andtype="sss"andquery="flowerpot"

Page 28: Building With YQL And YUI

Afewexamples...

select*fromgoogle.newswhereq="healthcare"

Page 29: Building With YQL And YUI

Afewexamples...select*fromquery.mul8wherequeriesin('select*fromnyt.ar8cle.searchwherequery="healthcare"','select*frommicrosoc.bing.newswherequery="healthcare"','select*fromgoogle.newswhereq="healthcare"'

)

Page 30: Building With YQL And YUI

Afewexamples...

selectcontentfromhtmlwhereurl="hIp://www.foxnews.com/"andxpath="//h2/a"

Page 31: Building With YQL And YUI

Afewexamples...

select*fromgoogle.translatewhereqin(selectcontentfromhtmlwhereurl="hIp://www.foxnews.com/"andxpath="//h2/a"

)andtarget="fr"

Page 32: Building With YQL And YUI

Afewexamples...

insertintowordpress.post(8tle,descrip8on,blogurl,username,password)values("TestTitle","Thisisatestbody","hIp://yqltest.wordpress.com","yqltest","password")

Page 33: Building With YQL And YUI

UsingYQLhasalotofbenefits:

No8mewastedreadingAPIdocsUsingtheconsolemakescrea8ngcomplexqueriesdeadeasy.Datafilteringdowntotheleastamountnecessary.Fastpipes.Caching+conver8ngServer‐sideJavaScript

Page 34: Building With YQL And YUI
Page 35: Building With YQL And YUI

UsingYQLiseasy!(PHP)

Page 36: Building With YQL And YUI

UsingYQLiseasy!(JavaScript)

Page 37: Building With YQL And YUI

WhatItendtodowithYQLisbuildAPIsthatrenderoutHTML.

Page 38: Building With YQL And YUI
Page 39: Building With YQL And YUI
Page 40: Building With YQL And YUI

Thereason:re‐use.

Page 41: Building With YQL And YUI

An“API”likethisallowsyoutobuildanon‐scriptversionandre‐useitwithAjaxforaslickerexperience.

Page 42: Building With YQL And YUI

Furthermore,youcanofferittotheoutsideworldlater:)

Page 43: Building With YQL And YUI

Andtobuildtheinterface,Iuselibraries.

Page 44: Building With YQL And YUI

Libraries.

(...)

Page 45: Building With YQL And YUI

STOPTH

EMADN

ESS

Page 46: Building With YQL And YUI

Buildinterfacesthatwork!

Page 47: Building With YQL And YUI
Page 48: Building With YQL And YUI
Page 54: Building With YQL And YUI
Page 55: Building With YQL And YUI
Page 56: Building With YQL And YUI
Page 57: Building With YQL And YUI
Page 60: Building With YQL And YUI

Byusingout‐of‐the‐boxsolu8onsandkeepingapragma8cmindyoucanquicklybuildsomething.

Page 61: Building With YQL And YUI

Andifthatisnotcrea8veenoughforyou,youcouldhelpimprovingthelibrariesthatenableotherstodoso.

Page 62: Building With YQL And YUI

Onlybyusing,tes8ngandimprovingwecanbuildbeIersolu8ons.

Page 63: Building With YQL And YUI

So,givethethingsIshowedago,andfeedbacktouswhatneedsimprovement!

Page 64: Building With YQL And YUI

Chris8anHeilmannhIp://wait‐8ll‐i.comhIp://developer‐evangelism.comhIp://twiIer.com/codepo8

Thanks!