Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Programming Social Applications

10,271 views

Published on

Programming Social Applications talk at ConvergeSE 2011 (Columbia, SC)

Published in: Technology, Design

Programming Social Applications

  1. Programming Social Applications<br />Jonathan LeBlanc<br />Principal Software Engineer<br />Yahoo! Developer Network<br />Twitter: @jcleblanc<br />Web: http://www.jcleblanc.com<br />
  2. What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  3. Finger to Webfinger: Find User Social Data
  4. Return of the Semantic Web: The Open Graph Protocol
  5. Defining User Actions: Activity Streams
  6. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  7. Finger to Webfinger: Find User Social Data
  8. Return of the Semantic Web: The Open Graph Protocol
  9. Defining User Actions: Activity Streams
  10. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>Core Concepts: What is a Social Application?<br />
  11. Core Concepts: What Makes up a Social Application?<br />The Social Graph<br />Sharing Model<br />Relationship Model<br />
  12. Core Concepts: The Social Graph<br />
  13. Core Concepts: Applying the Real Life Social Graph Online<br />
  14. Core Concepts: The Different Sharing Models<br />The Opt-in Model<br />The Opt-out Model<br />
  15. Core Concepts: Relationship Models<br />Follower Model<br />Connection Model<br />Group Model<br />
  16. What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  17. Finger to Webfinger: Find User Social Data
  18. Return of the Semantic Web: The Open Graph Protocol
  19. Defining User Actions: Activity Streams
  20. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>WebFinger<br />http://code.google.com/p/webfinger/<br />
  21. WebFinger: Origin Through the Finger Protocol<br />finger jleblanc@yahoo-inc.com<br />Login name: jleblanc<br />In real life: Jonathan LeBlanc<br />Home phone: 123-4567<br />Office: Sunnyvale, CA<br />Last Login: Tue Jun 21 15:41 on ttys000<br />jleblanc@yahoo-inc.com<br />http://www.jcleblanc.com<br />
  22. WebFinger: How it Works<br />
  23. WebFinger: How it Works<br />
  24. WebFinger: How it Works<br />
  25. WebFinger: PerformingWebFinger Discovery<br />curl http://gmail.com/.well-known/host-meta <br /><XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' <br />xmlns:hm='http://host-meta.net/xrd/1.0'><br /> <hm:Hostxmlns='http://host-meta.net/xrd/1.0'><br />gmail.com</hm:Host><br /> <Link rel='lrdd' template=<br /> 'http://www.google.com/s2/webfinger/?q={uri}'><br /> <Title>Resource Descriptor</Title><br /> </Link><br /></XRD><br />
  26. WebFinger: PerformingWebFinger Discovery<br />curl http://www.google.com/s2/webfinger/?q=nakedtechnologist@gmail.com<br />The User Profile: http://www.google.com/profiles/nakedtechnologist<br />The portable contacts link: http://www-opensocial.googleusercontent.com/api/people/118167121283215553793/<br />The public Google Buzz feed: https://www.googleapis.com/buzz/v1/activities/118167121283215553793/@public<br />
  27. WebFinger: Homework<br />Using the well-known host-meta file, attempt to obtain your public profile from www.yahoo.com<br />
  28. What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  29. Finger to Webfinger: Find User Social Data
  30. Return of the Semantic Web: The Open Graph Protocol
  31. Defining User Actions: Activity Streams
  32. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>The Open Graph Protocol<br />http://ogp.me/<br />
  33. Open Graph Protocol: How Web Semantics Work<br />
  34. Open Graph Protocol: How Web Semantics Work<br />Geo<br /><span class="geo"><br /> <span class="latitude">52.48</span>,<br /> <span class="longitude">-1.89</span><br /></span><br />vCard<br /><div class="vcard"> <br /> <div class="fn">Joe Doe</div> <br /> <div class="org">The Example Company</div> <br /> <div class="tel">604-555-1234</div> <br /> <a class="url" href="http://site.com/">http://site.com/</a> <br /></div><br />
  35. Open Graph Protocol: Vision of the Semantic Web<br />
  36. Open Graph Protocol: Reality of the Semantic Web<br />
  37. Open Graph Protocol: What Changed?<br />
  38. Open Graph Protocol: How it Works<br />
  39. Open Graph Protocol: How it Works<br />
  40. Open Graph Protocol: How it Works<br />
  41. Open Graph Protocol: The Meta Data Format<br /><html xmlns:og="http://ogp.me/ns#"><br /><head><br /><title>Restaurant at Wente Vineyards – Livermore</title><br /><meta property="og:url" <br /> content="http://www.yelp.com/biz/gATFcG9HTaXJpg"><br /><meta property="og:type" content="restaurant"> <br /><meta property="og:title" <br /> content="The Restaurant at Wente Vineyards"> <br /><meta property="og:image" <br /> content="http://media2.px.yelpcdn.com/iVSnIs"> <br />...<br /></head><br />...<br /></html><br />
  42. Open Graph Protocol: What is Defined?<br /><ul><li> Basic Metadata
  43. Location
  44. Contact Information
  45. Video Data
  46. Audio Data
  47. Objects
  48. Activities
  49. Businesses
  50. Groups
  51. Organizations
  52. People
  53. Places
  54. Products and Entertainment
  55. Websites</li></li></ul><li>Open Graph Protocol: Drawbacks<br />How do we differentiating like objects from one another?<br />How do we define definitions for an entire page versus a single object?<br />
  56. Open Graph Protocol: Homework<br />Construct an Open Graph meta-data parser, then extract Open Graph meta-data from a restaurant page on www.yelp.com<br />Hint: The www.ogp.me page has parser helpers. <br />
  57. What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  58. Finger to Webfinger: Find User Social Data
  59. Return of the Semantic Web: The Open Graph Protocol
  60. Defining User Actions: Activity Streams
  61. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>Activity Streams<br />http://activitystrea.ms/<br />
  62. Activity Streams: What is an Activity?<br />
  63. Activity Streams: What is an Activity?<br />Mary added to a new photo into her collection. <br /><ul><li> Mary: The Actor
  64. Photo: The Object
  65. Collection: The Target</li></li></ul><li>Activity Streams: The Standard JSON Object<br />{ <br /> "items" : [{<br /> "verb": "post",<br /> "published": "2011-02-18T16:26:43Z",<br /> "provider": {<br /> "url": "http://providersite.com/activity-stream"<br /> },<br /> "title": "Mary added a photo to her album.",<br /> "actor": { ... },<br /> "object" : { ... },<br /> "target": { ... }<br /> }]<br />}<br />
  66. Activity Streams: The Actor<br />Mary added to a new photo into her collection.<br />"actor": {<br /> "url": "http://providersite.com/mary",<br /> "objectType": "person",<br /> "id": "tag:provider.com,20110218,162643:mary",<br /> "image": {<br /> "url": "http://providersite.com/mary/image",<br /> "width": 125,<br /> "height": 125<br /> },<br /> "displayName": "Mary Smith"<br />}, <br />
  67. Activity Streams: The Object<br />Mary added to a new photo into her collection.<br />"object" : {<br /> "url": "http://site.com/mary/album/place.jpg",<br /> "objectType": "http://activitystrea.ms/schema/1.0/photo",<br /> "id": "tag:provider.com,20110218,162643:place",<br /> "image": {<br /> "url": "http://site.com/mary/album/thumb.jpg",<br /> "width": 100,<br /> "height": 100<br /> }<br />},<br />
  68. Activity Streams: The Target<br />Mary added to a new photo into her collection. <br />"target": {<br /> "url": "http://targetsite.com/mary/album/",<br /> "objectType": "http://activitystrea.ms/schema/1.0/ <br /> photo-album",<br /> "id": "tag:example.org,20110218,162643:album4323",<br /> "displayName": "Mary's Photo Album",<br /> "image": {<br /> "url": "http://site.com/mary/album/thumbnail.jpg",<br /> "width": 100,<br /> "height": 100<br /> }<br />}<br />
  69. Activity Streams: Object Properties<br />Object Properties<br />attachments<br />author<br />content<br />display<br />name<br />downstreamDuplicates<br />id<br />image<br />object<br />type<br />published<br />summary<br />updated<br />upstreamDuplicates<br />url<br />url<br />width<br />Media Object Properties<br />duration<br />height<br />
  70. Activity Streams: Homework<br />Take one of your activities (with a photo) from Facebook and convert it to an activity stream object.<br />
  71. What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  72. Finger to Webfinger: Find User Social Data
  73. Return of the Semantic Web: The Open Graph Protocol
  74. Defining User Actions: Activity Streams
  75. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>PubSubHubbub<br />http://code.google.com/p/pubsubhubbub/<br />
  76. PubSubHubbub: How it Works<br />
  77. PubSubHubbub: How it Works<br />
  78. PubSubHubbub: How it Works<br />
  79. PubSubHubbub: How it Works<br />
  80. PubSubHubbub: How it Works<br />
  81. The Salmon Protocol<br />www.salmon-protocol.org<br />
  82. The Salmon Protocol: How it Works<br />
  83. The Salmon Protocol: How it Works<br />
  84. The Salmon Protocol: How it Works<br />
  85. The Salmon Protocol: Things to Consider<br /><ul><li>Is the content coming from a trusted source?
  86. How does the publisher prevent spam or abuse?
  87. How does the publisher ensure the quality of the updates?</li></li></ul><li>The Salmon Protocol: Determining Source<br />Subscriber sends signed request to publisher (e.g. using acct:johndoe@subscriber.example.com).<br />Publisher performs discovery on endpoint to verify identity provider.<br /><ul><li>Webfinger
  88. LRDD (Link-based Resource Descriptor)</li></ul>Provider verifies signature via public keys obtained during discovery.<br />
  89. Pubsubhubbub and Salmon: Homework<br />Construct a subscriber to subscribe to a hub, then create a publisher to push a feed to a hub.<br />Hint: www.superfeedr.com has a hosted hub solution at http://superfeedr.com/hubbub<br />
  90. What We’re Going to Cover<br /><ul><li>The Social Application: Core Concepts
  91. Finger to Webfinger: Find User Social Data
  92. Return of the Semantic Web: The Open Graph Protocol
  93. Defining User Actions: Activity Streams
  94. Controlling Content Syndication: PubSubHubbub and Salmon</li></li></ul><li>Resources<br />This Presentation:<br />http://www.slideshare.net/jcleblanc/programming-social <br />Code Sources:<br />https://github.com/jcleblanc/programming-social-applications<br />Purchase the Book:<br />Amazon:http://amzn.to/mQrUkE<br />O’Reilly:http://oreil.ly/gzEKiM<br />O’Reilly ebook code (50% off): DDM97 <br />Follow Updates:<br />Facebook:www.facebook.com/programmingsocialapps<br />Twitter: @socialappsbook<br />
  95. Questions?<br />http://www.slideshare.net/jcleblanc/slideshare.net/jcleblanc/programming-social<br />Jonathan LeBlanc<br />Twitter: @jcleblanc<br />E-Mail: jleblanc@yahoo-inc.com<br />

×