Building With YQL And YUI
-
Upload
christian-heilmann -
Category
Technology
-
view
6.425 -
download
3
description
Transcript of Building With YQL And YUI
YQLandYUIBuildingblocksforquickapplica8ons
Chris8anHeilmann,Yahoointernaltalk,Sunnyvale,California,02/02/2010
Iamknowntobeabletoquicklybuildcooldemos.
hIp://keywordfinder.org/
hIp://isithackday.com/hacks/guardian/
hIp://icant.co.uk/geomaker/index.php
hIp://github.com/codepo8/QuickTrans
hIp://icant.co.uk/goohoobi/index.php?research
hIp://uk‐house‐prices.com/
ThereasonisthatIambuildingwiththingsthatwork.
Andthatgivesme8metoconcentrateontheimportantthings.
OnethingIamboredofiswri8ngCSSlayouts.
WhichiswhyIamusingaverysimplesolu8on.
hIp://developer.yahoo.com/yui/grids/builder/
hIp://developer.yahoo.com/yui/grids/builder/
ThereasonisthatIwanttosupportbrowsers‐notworkforthem.
I’dratherbeabletoupdateaCSSURIthanre‐writemyCSSwhenanewbrowsercomesaround.
Thingswespendfartoomuch8meon:
Hackstomakebrowserswork.Op8misingprematurely.Usingourpetlanguage/environment/libraryReadingbadlywriIentutorialsandincompletedocumenta8on.Usingbleedingedgeeffectsandinterfacesandthentryingtocreateafallbacksolu8on.Flashyeffects.
Whatwereallyshouldstartwithisthedata.
ThisiswhereAPIsandwebservicescomein.
TheissueisthatallofthesearewriIendifferently,expectdifferentauthen8ca8onandgivebackdifferentdata.
YQLhIp://developer.yahoo.com/yql/console/
YQLhIp://developer.yahoo.com/yql/console/
select{what}from{where}where{condi8ons}
hIp://isithackday.com/hacks/frankfurt
http://github.com/yql/yql-tables
Afewexamples...
select*fromflickr.photos.searchwheretext="donkey"
Afewexamples...
select*fromflickr.photos.searchwheretext="donkey"andlicense=4
Afewexamples...
select*fromcraigslist.searchwhereloca8on="s`ay"andtype="sss"andquery="flowerpot"
Afewexamples...
select*fromgoogle.newswhereq="healthcare"
Afewexamples...select*fromquery.mul8wherequeriesin('select*fromnyt.ar8cle.searchwherequery="healthcare"','select*frommicrosoc.bing.newswherequery="healthcare"','select*fromgoogle.newswhereq="healthcare"'
)
Afewexamples...
selectcontentfromhtmlwhereurl="hIp://www.foxnews.com/"andxpath="//h2/a"
Afewexamples...
select*fromgoogle.translatewhereqin(selectcontentfromhtmlwhereurl="hIp://www.foxnews.com/"andxpath="//h2/a"
)andtarget="fr"
Afewexamples...
insertintowordpress.post(8tle,descrip8on,blogurl,username,password)values("TestTitle","Thisisatestbody","hIp://yqltest.wordpress.com","yqltest","password")
UsingYQLhasalotofbenefits:
No8mewastedreadingAPIdocsUsingtheconsolemakescrea8ngcomplexqueriesdeadeasy.Datafilteringdowntotheleastamountnecessary.Fastpipes.Caching+conver8ngServer‐sideJavaScript
UsingYQLiseasy!(PHP)
UsingYQLiseasy!(JavaScript)
WhatItendtodowithYQLisbuildAPIsthatrenderoutHTML.
Thereason:re‐use.
An“API”likethisallowsyoutobuildanon‐scriptversionandre‐useitwithAjaxforaslickerexperience.
Furthermore,youcanofferittotheoutsideworldlater:)
Andtobuildtheinterface,Iuselibraries.
Libraries.
(...)
STOPTH
EMADN
ESS
Buildinterfacesthatwork!
hIp://icant.co.uk/csscharts/
hIp://uk‐house‐prices.com/graphs.php?bloc=230&bstart=50&bend=54&start=50&end=54&loc=230
hIp://developer.yahoo.com/yui/ar8cles/hos8ng/#configure
hIp://developer.yahoo.com/yui/examples/autocomplete/ac_basic_array.html
hIp://developer.yahoo.com/yui/examples/slider/slider_dual_with_highlight.html
Kidsthesedays...
hIp://www.flickr.com/photos/jamin2/3851031112/hIp://www.flickr.com/photos/codepo8/311805104/
Byusingout‐of‐the‐boxsolu8onsandkeepingapragma8cmindyoucanquicklybuildsomething.
Andifthatisnotcrea8veenoughforyou,youcouldhelpimprovingthelibrariesthatenableotherstodoso.
Onlybyusing,tes8ngandimprovingwecanbuildbeIersolu8ons.
So,givethethingsIshowedago,andfeedbacktouswhatneedsimprovement!
Chris8anHeilmannhIp://wait‐8ll‐i.comhIp://developer‐evangelism.comhIp://twiIer.com/codepo8
Thanks!