2011 HackU UCSD

1,445 views

Published on

HackU Technical kickoff talk at UCSD in San Diego, CA (2011)

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,445
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

2011 HackU UCSD

  1. 1. 1<br />
  2. 2. 2<br />SELECT * FROM InternetBuilding Queries and Stuff<br />
  3. 3. 3<br />
  4. 4. 4<br />
  5. 5. Skills you May Already Have<br />SELECT myColumn, myTitle<br />FROM myTable<br />WHERE myColumn = 'value' <br />AND myTitle = 'title'<br />LIMIT 3 OFFSET 10<br />
  6. 6. Is YQL a Database?<br />
  7. 7. NO!<br />
  8. 8. 8<br />YQL Test Console<br />Available At: http://developer.yahoo.com/yql/console<br />
  9. 9.
  10. 10. Don’t Reinvent the Wheel<br />
  11. 11. Getting Started<br />
  12. 12. Step 1: Include Global JS<br /><script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script><br />
  13. 13. Step 2: Create YUI Global Object<br />YUI().use(’module1', ’module2', function(Y) { <br /> //module1 is available <br /> //module2 is available<br />});<br />
  14. 14. DOM Manipulation<br />
  15. 15. YUI().use('node', function(Y) { <br />var node1 = Y.one('#myNode'); <br />varnode2 =Y.all('#myNodeli');<br />nodeID = node1.get('id');<br /> node1.set('innerHTML','new content');<br />node2.addClass('bar');<br />});<br />
  16. 16. Handling Events<br />
  17. 17. YUI().use('node', function(Y) { <br />Y.one('#demo').on('click', function(e) { <br />alert('event: ' + e.type +<br /> ' target: ' + e.target.get('tagName')); <br /> });<br />});<br />
  18. 18. Making YQL Requests<br />
  19. 19. YUI().use('yql', function(Y) { <br />new Y.yql(’SHOW Tables', function(r){ <br />r.query; //the result <br />r.error; //the error message <br /> });<br />});<br />
  20. 20. Cross-Domain Requests<br />
  21. 21. YUI().use("io-xdr", function(Y) {<br />varxdrCfg = { src:'io.swf' }; <br />Y.io.transport(xdrCfg);<br />varcfg = { <br /> use: 'flash', //use flash transport <br /> data: 'foo=bar&baz=boo' //data to transfer <br /> timeout: 3000, //transfer timeout<br /> };<br />varGlobalEventHandler = {<br /> success: function(id, o, args) {<br />vardata = o.responseText; <br /> }};<br />Y.on('io:success', GlobalEventHandler.complete, this);<br />varrequest = Y.io(uri, cfg);<br />});<br />
  22. 22. Need Something Else? Get it from the Gallery<br />http://yuilibrary.com/gallery/<br />
  23. 23. This Presentaton<br />http://www.slideshare.net/jcleblanc<br />YQL Documentation<br />http://developer.yahoo.com/yql<br />YUI Documentation<br />http://developer.yahoo.com/yui<br />Contact Me<br />Twitter: @jcleblanc<br />

×