1 / 59

Programming Social Applications

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

jcleblanc
Download Presentation

Programming Social Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Social Applications Jonathan LeBlanc Principal Software Engineer Yahoo! Developer Network Twitter: @jcleblanc Web: http://www.jcleblanc.com

  2. What We’re Going to Cover • The Social Application: Core Concepts • Finger to Webfinger: Find User Social Data • Return of the Semantic Web: The Open Graph Protocol • Defining User Actions: Activity Streams • Controlling Content Syndication: PubSubHubbub and Salmon

  3. What We’re Going to Cover • The Social Application: Core Concepts • Finger to Webfinger: Find User Social Data • Return of the Semantic Web: The Open Graph Protocol • Defining User Actions: Activity Streams • Controlling Content Syndication: PubSubHubbub and Salmon

  4. Core Concepts: What is a Social Application?

  5. Core Concepts: What Makes up a Social Application? The Social Graph Sharing Model Relationship Model

  6. Core Concepts: The Social Graph

  7. Core Concepts: Applying the Real Life Social Graph Online

  8. Core Concepts: The Different Sharing Models The Opt-in Model The Opt-out Model

  9. Core Concepts: Relationship Models Follower Model Connection Model Group Model

  10. What We’re Going to Cover • The Social Application: Core Concepts • Finger to Webfinger: Find User Social Data • Return of the Semantic Web: The Open Graph Protocol • Defining User Actions: Activity Streams • Controlling Content Syndication: PubSubHubbub and Salmon

  11. WebFinger http://code.google.com/p/webfinger/

  12. WebFinger: Origin Through the Finger Protocol finger jleblanc@yahoo-inc.com Login name: jleblanc In real life: Jonathan LeBlanc Home phone: 123-4567 Office: Sunnyvale, CA Last Login: Tue Jun 21 15:41 on ttys000 jleblanc@yahoo-inc.com http://www.jcleblanc.com

  13. WebFinger: How it Works

  14. WebFinger: How it Works

  15. WebFinger: How it Works

  16. WebFinger: PerformingWebFinger Discovery curl http://gmail.com/.well-known/host-meta <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' xmlns:hm='http://host-meta.net/xrd/1.0'> <hm:Hostxmlns='http://host-meta.net/xrd/1.0'> gmail.com</hm:Host> <Link rel='lrdd' template= 'http://www.google.com/s2/webfinger/?q={uri}'> <Title>Resource Descriptor</Title> </Link> </XRD>

  17. WebFinger: PerformingWebFinger Discovery curl http://www.google.com/s2/webfinger/?q=nake dtechnologist@gmail.com The User Profile: http://www.google.com/profiles/nakedtechnologist The portable contacts link: http://www- opensocial.googleusercontent.com/api/people/118167 121283215553793/ The public Google Buzz feed: https://www.googleapis.com/buzz/v1/activities/118167 121283215553793/@public

  18. WebFinger: Homework Using the well-known host-meta file, attempt to obtain your public profile from www.yahoo.com

  19. What We’re Going to Cover • The Social Application: Core Concepts • Finger to Webfinger: Find User Social Data • Return of the Semantic Web: The Open Graph Protocol • Defining User Actions: Activity Streams • Controlling Content Syndication: PubSubHubbub and Salmon

  20. The Open Graph Protocol http://ogp.me/

  21. Open Graph Protocol: How Web Semantics Work

  22. Open Graph Protocol: How Web Semantics Work Geo <span class="geo"> <span class="latitude">52.48</span>, <span class="longitude">-1.89</span> </span> vCard <div class="vcard"> <div class="fn">Joe Doe</div> <div class="org">The Example Company</div> <div class="tel">604-555-1234</div> <a class="url" href="http://site.com/">http://site.com/</a> </div>

  23. Open Graph Protocol: Vision of the Semantic Web

  24. Open Graph Protocol: Reality of the Semantic Web

  25. Open Graph Protocol: What Changed?

  26. Open Graph Protocol: How it Works

  27. Open Graph Protocol: How it Works

  28. Open Graph Protocol: How it Works

  29. Open Graph Protocol: The Meta Data Format <html xmlns:og="http://ogp.me/ns#"> <head> <title>Restaurant at Wente Vineyards – Livermore</title> <meta property="og:url" content="http://www.yelp.com/biz/gATFcG9HTaXJpg"> <meta property="og:type" content="restaurant"> <meta property="og:title" content="The Restaurant at Wente Vineyards"> <meta property="og:image" content="http://media2.px.yelpcdn.com/iVSnIs"> ... </head> ... </html>

  30. Open Graph Protocol: What is Defined? • Basic Metadata • Location • Contact Information • Video Data • Audio Data • Objects • People • Places • Products and Entertainment • Websites • Activities • Businesses • Groups • Organizations

  31. Open Graph Protocol: Drawbacks How do we differentiating like objects from one another? How do we define definitions for an entire page versus a single object?

  32. Open Graph Protocol: Homework Construct an Open Graph meta-data parser, then extract Open Graph meta-data from a restaurant page on www.yelp.com Hint: The www.ogp.me page has parser helpers.

  33. What We’re Going to Cover • The Social Application: Core Concepts • Finger to Webfinger: Find User Social Data • Return of the Semantic Web: The Open Graph Protocol • Defining User Actions: Activity Streams • Controlling Content Syndication: PubSubHubbub and Salmon

  34. Activity Streams http://activitystrea.ms/

  35. Activity Streams: What is an Activity?

  36. Activity Streams: What is an Activity? Mary added to a new photo into her collection. • Mary: The Actor • Photo: The Object • Collection: The Target

  37. Activity Streams: The Standard JSON Object { "items" : [{ "verb": "post", "published": "2011-02-18T16:26:43Z", "provider": { "url": "http://providersite.com/activity-stream" }, "title": "Mary added a photo to her album.", "actor": { ... }, "object" : { ... }, "target": { ... } }] }

  38. Activity Streams: The Actor Mary added to a new photo into her collection. "actor": { "url": "http://providersite.com/mary", "objectType": "person", "id": "tag:provider.com,20110218,162643:mary", "image": { "url": "http://providersite.com/mary/image", "width": 125, "height": 125 }, "displayName": "Mary Smith" },

  39. Activity Streams: The Object Mary added to a new photo into her collection. "object" : { "url": "http://site.com/mary/album/place.jpg", "objectType": "http://activitystrea.ms/schema/1.0/photo", "id": "tag:provider.com,20110218,162643:place", "image": { "url": "http://site.com/mary/album/thumb.jpg", "width": 100, "height": 100 } },

  40. Activity Streams: The Target Mary added to a new photo into her collection. "target": { "url": "http://targetsite.com/mary/album/", "objectType": "http://activitystrea.ms/schema/1.0/ photo-album", "id": "tag:example.org,20110218,162643:album4323", "displayName": "Mary's Photo Album", "image": { "url": "http://site.com/mary/album/thumbnail.jpg", "width": 100, "height": 100 } }

  41. Activity Streams: Object Properties Object Properties attachments author content display name downstreamDuplicates id image object type published summary updated upstreamDuplicates url Media Object Properties duration height url width

  42. Activity Streams: Homework Take one of your activities (with a photo) from Facebook and convert it to an activity stream object.

  43. What We’re Going to Cover • The Social Application: Core Concepts • Finger to Webfinger: Find User Social Data • Return of the Semantic Web: The Open Graph Protocol • Defining User Actions: Activity Streams • Controlling Content Syndication: PubSubHubbub and Salmon

  44. PubSubHubbub http://code.google.com/p/pubsubhubbub/

  45. PubSubHubbub: How it Works

  46. PubSubHubbub: How it Works

  47. PubSubHubbub: How it Works

  48. PubSubHubbub: How it Works

  49. PubSubHubbub: How it Works

  50. The Salmon Protocol www.salmon-protocol.org

More Related