UWash Hack U - Y!OS

1,353 views

Published on

Y!OS overview and deep code dive

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

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

No notes for slide
  • UWash Hack U - Y!OS

    1. 1. Yahoo! Open Strategy (Y!OS) Jonathan LeBlanc – Sr. Software Engineer / Tech Evangelist Yahoo! Developer Network – Partner Integrations February 19, 2009
    2. 2. Yahoo! Open Strategy (Y!OS)
    3. 3. <ul><li>Underlying social platform </li></ul><ul><li>Unified profile system </li></ul><ul><li>Updates across Yahoo! </li></ul><ul><li>Rich connections </li></ul>Y!OS Establishes a Social Dimension
    4. 4. Y!OS: Social APIs
    5. 5. Y!OS: Social APIs
    6. 6. Y!OS: Social APIs
    7. 7. <ul><li>Open application system </li></ul><ul><li>Tie in core APIs </li></ul><ul><li>Allow rich services on and off Yahoo! </li></ul>Y!OS Enables Open Application Development
    8. 8. <ul><li>Yahoo! Application Platform </li></ul><ul><li>Open applications (run on YAP) </li></ul><ul><li>OAuth applications (run on your site) </li></ul><ul><li>http://developer.yahoo.com/yap </li></ul>Y!OS Applications
    9. 9. Y!OS: Open Applications
    10. 10. <ul><li>Richly social infrastructure/ platform changes </li></ul><ul><li>Developer opportunities across Yahoo! and the web </li></ul><ul><li>Reaching 500M users using Yahoo! technologies </li></ul>Y!OS Rewires Yahoo!
    11. 11. <ul><li>Y!OS Components How does it work? </li></ul>
    12. 12. Y!OS Components – Open Authentication (OAuth) <ul><li>2-legged & 3-legged OAuth </li></ul><ul><li>Consumer / Shared Secret keys </li></ul><ul><li>Similar to proprietary BBAuth, but open standard </li></ul><ul><li>http://developer.yahoo.com/oauth/ </li></ul>
    13. 13. <ul><li>Allows secured access to private data </li></ul><ul><li>Can use ‘me’ and ‘viewer’ keywords </li></ul><ul><li>Will begin integrating into OSML </li></ul><ul><li>http://developer.yahoo.com/yap/yml </li></ul>Y!OS Components – Yahoo Markup Language (YML)
    14. 14. <ul><li>Social Directory (read) </li></ul><ul><li>Contacts (read) </li></ul><ul><li>User Status (read / write) </li></ul><ul><li>Updates (read / write) </li></ul><ul><li>http://developer.yahoo.com/social </li></ul>Y!OS Components – Social APIs
    15. 15. <ul><li>HTML / CSS / JavaScript securer </li></ul><ul><li>Enforces standards </li></ul><ul><li>Includes JSLint (http://www.jslint.com) </li></ul><ul><li>One of the first to integrate Caja </li></ul><ul><li>http://code.google.com/p/google-caja </li></ul><ul><li>http://developer.yahoo.com/yap/guide/caja-support.html </li></ul>Y!OS Components – Caja
    16. 16. PHP SDK Currently Available Open and OAuth Applications ActionScript 3 SDK Currently Available Open Applications Java SDK in Development Open and OAuth Applications Y!OS Components – SDKs
    17. 17. <ul><li>SQL-like syntax </li></ul><ul><li>Private / Public Data </li></ul><ul><li>Use of many YDN APIs </li></ul><ul><li>Captures external data feeds </li></ul><ul><li>Allows custom tables with the “Open Data Tables” feature </li></ul><ul><li>http://developer.yahoo.com/yql </li></ul>Y!OS Components – Yahoo! Query Language (YQL)
    18. 18. <ul><li>YAP Applications How do I get started? </li></ul>
    19. 19. <ul><li>Runs on YAP </li></ul><ul><li>Supports 2- & 3- legged OAuth </li></ul><ul><li>Supports OpenSocial 0.8 JavaScript APIs </li></ul>Open Applications
    20. 20. Open Application - Views Small View Large View
    21. 21. Open Application – Small View
    22. 22. Open Application – Large View
    23. 23. <ul><li>http://developer.yahoo.com/dashboard </li></ul>
    24. 24. <ul><li>http://developer.yahoo.com/dashboard </li></ul>
    25. 28. <ul><li>Runs off platform </li></ul><ul><li>Supports 2- & 3-legged OAuth </li></ul><ul><li>Does not contain views </li></ul><ul><li>Requires users to authenticate session </li></ul>OAuth Applications
    26. 29. <ul><li>http://developer.yahoo.com/dashboard </li></ul>
    27. 30. <ul><li>http://developer.yahoo.com/dashboard </li></ul>
    28. 36. <ul><li>YAP Code Dive What can you do with YAP? </li></ul>
    29. 37. <ul><li>YAP Code Dive PHP SDK </li></ul>
    30. 38. Used For: - Public user data and open APIs PHP SDK – 2-Legged OAuth Initialization
    31. 39. <ul><li>Used For: </li></ul><ul><li>Private data access </li></ul>PHP SDK – 3-Legged OAuth Initialization
    32. 40. 3-Legged OAuth getSessionedUser (session) getOwner (session) getUser (session) query (session) getPresence (user) setPresence (user) listUpdates (user) listConnectionUpdates (user) insertUpdate (user) deleteUpdate (user) loadProfile (user) getConnections (user) getContacts (user) setSmallView (user) 2-Legged OAuth setSmallView (application) query (application) PHP SDK – Available Methods
    33. 41. PHP SDK – Create a User Update
    34. 42. PHP SDK – Set the Status of a User
    35. 43. <ul><li>YAP Code Dive Yahoo! Markup Language (YML) </li></ul>
    36. 44. YML Tags (Large View) yml:a yml:ad yml:audio yml:form yml:friend-selector yml:if-env yml:message yml:name yml:profile-pic yml:pronoun yml:share yml:swf yml:user-badge   YML Lite Tags (Small View) yml:a yml:audio yml:form yml:if-env yml:name yml:profile-pic yml:pronoun yml:user-badge YML – Available Tags
    37. 45. YML:A Tab Sample - Controller
    38. 46. YML:A Tab Sample – Tab Construction
    39. 47. YML:A Tab Sample - Product
    40. 48. YML:A Small View Update Sample
    41. 49. YML:A Small View Update Sample
    42. 50. <ul><li>YAP Code Dive Yahoo! Query Language (YQL) </li></ul>
    43. 51. Projection - SELECT what FROM table - SELECT * FROM social.connections Local and Remote Filtering - SELECT what FROM table WHERE filter - SELECT * FROM social.profile WHERE guid = me Sub-selects - Joining Data - SELECT what FROM table WHERE fieldvalue IN (SELECT ...) - SELECT * FROM social.profile WHERE guid IN (SELECT guid FROM social.connections WHERE owner_guid=me) Local Paging Control - SELECT what FROM table WHERE filter LIMIT 10 OFFSET 50 - SELECT * FROM web.search WHERE query=&quot;madonna&quot; LIMIT 3 OFFSET 10 Remove Table Size Control - SELECT what FROM table(0,500) WHERE condition - SELECT * FROM web.search(0,10) WHERE query=&quot;madonna&quot; AND result.XXX = something YQL – Query Structure
    44. 52. YQL Command: SHOW tables YQL – Available Tables
    45. 53. YQL Command: DESC social.connections YQL – Table Contents
    46. 54. YQL – Running a Query
    47. 55. YQL – Output Types
    48. 56. <ul><li>YAP Code Dive Caja </li></ul>
    49. 57. Caja – JavaScript Before Cajoling
    50. 58. Caja – JavaScript After Cajoling
    51. 59. Caja – Best Practices <ul><li>Use OpenSocial JavaScript standards </li></ul><ul><li>Use W3C standards </li></ul><ul><li>Use YML wherever possible </li></ul><ul><li>Unit test all JavaScript </li></ul><ul><li>Read the documentation (http://developer.yahoo.com/yos) </li></ul><ul><li>Participate in the forums (http://developer.yahoo.net/forum/) </li></ul>
    52. 60. <ul><li>YAP Code Dive Common Questions </li></ul>
    53. 61. <ul><li>I have an existing OpenSocial application. How do I get started? </li></ul><ul><li>I have an existing Facebook application. How do I get started? </li></ul><ul><li>How do I authenticate OAuth using JavaScript? </li></ul><ul><li>Why PHP / AS3 for the first SDK? </li></ul><ul><li>How do users find my application? </li></ul>Common Questions – Q & A
    54. 62. <ul><li>Thank You Questions? </li></ul>

    ×