Yql && Raphaël

4,480 views

Published on

A presentation on what YQL and Raphaël are and why you might want to use them that I gave at BrooklynJS meetup in October 2010.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,480
On SlideShare
0
From Embeds
0
Number of Embeds
359
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide











































  • Yql && Raphaël

    1. 1. Something.js using YQL && Raphaël for fun || profit LACHSTOCK
    2. 2. YQL
    3. 3. YQL is Yahoo! Query Language
    4. 4. Yahoo! calls it:
    5. 5. An expressive SQL-like language that lets you query, filter, and join data across Web
    6. 6. I call it:
    7. 7. An API for the public internet.
    8. 8. I think my description is a bit more catchy.
    9. 9. SELECT * FROM search.web WHERE query="javascript"
    10. 10. SELECT what FROM table WHERE condition
    11. 11. = =! > < <= >= IN LIKE IS NULL IS NOT NULL AND OR
    12. 12. Join tables with sub-selects using matching values as a foreign key.
    13. 13. What is a YQL table?
    14. 14. What is a YQL table? The defaults are mostly data sources for Yahoo's own data APIs.
    15. 15. What is a YQL table? HTML JSON XML RSS ATOM CSV feeds microformats.
    16. 16. What is a YQL table? HTML JSON XML RSS ATOM CSV feeds microformats.
    17. 17. Tables are defined in XML.
    18. 18. <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta> <author>Paul Daniel</author> <documentationURL>http://apiwiki.twitter.com/REST+API +Documentation#show</documentationURL> </meta> <bindings> <select itemPath="feed.entry" produces="XML"> <urls> <url>http://twitter.com/statuses/user_timeline/{id}.atom</url> </urls> <paging model="page"> <start default="0" id="page"/> <pagesize max="200" id="count"/> <total default="20"/> </paging> <inputs> <key id="since" type="xs:string" paramType="query" /> <key id="since_id" type="xs:string" paramType="query" /> <key id="id" type="xs:string" paramType="path" required="true"/> </inputs> </select> </bindings> </table>
    19. 19. You can write your own.
    20. 20. And share them for others to use.
    21. 21. SHOW tables DESC table
    22. 22. What’s the output?
    23. 23. <?xml version="1.0" encoding="UTF-8"?> <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="10" yahoo:created="2009-02-11T03:16:48Z" yahoo:lang="en-US" yahoo:updated="2009-02-11T03:16:48Z" yahoo:uri="http:// query.yahooapis.com/v1/yql?q=SELECT+*+%0AFROM+search.web+WHERE+query%3D %22javascript%22"> <diagnostics> <publiclyCallable>true</publiclyCallable> <url execution-time="116">http://boss.yahooapis.com/ysearch/web/ v1/javascript?format=xml&amp;start=0&amp;count=10</url> <user-time>119</user-time> <service-time>116</service-time> <build-version>851</build-version> </diagnostics> <results> <result xmlns="http://www.inktomi.com/"> <abstract><![CDATA[<b>JavaScript</b> is super cool and awesome and we love it.]]></abstract> <clickurl>http://lrd.yahooapis.com/ _ylc=X3oDMTQ4NWxyYWUxBF9TAzIwMjMxNTI3MDIEYXBwaWQDb0pfTWdwbklrWW5CMWhTZnFUZ Ed5TkouTXNxZlNMQmkEcG9zAzEEc2VydmljZQNZU2VhcmNoV2ViBHNsawN0aXRsZQRzcmNwdml kA253RkNNVVBEQjJIMkxjVFRsQWt1ZVI0VXl6LkNJVW1TUXlBQUFLckk-/SIG=11tsuk1oo/ **http%3A//en.wikipedia.org/wiki/Ruby_(programming_language)</clickurl> <date>2009/02/01</date> <dispurl><![CDATA[<b>en.wikipedia.org</b>/wiki/<wbr><b>Ruby</
    24. 24. { "query": { "count":"10", "created":"2009-02-11T03:20:22Z", "lang":"en-US", "updated":"2009-02-11T03:20:22Z", "uri":"http://query.yahooapis.com/v1/yql? q=SELECT+*+%0AFROM+search.web+WHERE+query%3D %22javascript%22", "diagnostics": { "publiclyCallable":"true", "url": { "execution-time":"109",
    25. 25. Specify callback with ‘callback’ for JSON-P.
    26. 26. call({ "query": { "count":"10", "created":"2009-02-11T03:20:22Z", "lang":"en-US", "updated":"2009-02-11T03:20:22Z", "uri":"http://query.yahooapis.com/v1/yql? q=SELECT+*+%0AFROM+search.web+WHERE+query%3D %22javascript%22", "diagnostics": { "publiclyCallable":"true", "url": { "execution-time":"109",
    27. 27. http://query.yahooapis.com/ v1/public/yql?q=SELECT%20* %20%0AFROM%20search.web %20WHERE%20query%3D %22javscript%22 &format=json&callback=call
    28. 28. http://developer.yahoo.com/yql/
    29. 29. http://developer.yahoo.com/yql/console/
    30. 30. Raphaël
    31. 31. Dmitry calls it:
    32. 32. “A small JavaScript library that should simplify your work with vector graphics on the web.”
    33. 33. I call it:
    34. 34. Utterly amazing.
    35. 35. Raphaël lets you draw cross-browser vector graphics.
    36. 36. Even in IE6.
    37. 37. No more boxes.
    38. 38. “The web is not rectangular any more” - Dmitry Baranovskiy
    39. 39. http://raphaeljs.com/
    40. 40. http://github.com/lachlanhardy/something.js
    41. 41. Questions?

    ×