More Related Content

More from Patrick Chanezon(20)


Google IO 2008 - Opensocial, a Standard for the Social Web

  1. OpenSocial: A Standard for the Social Web Patrick Chanezon Kevin Marks Christian Schalk May 28, 2008
  2. Agenda OpenSocial Introduction How to build OpenSocial Applications OpenSocial Containers Becoming an OpenSocial container Summary
  3. OpenSocial Introduction - Patrick Chanezon
  4. Making the web better by making it social What does social mean?
  5. What does Social mean? Eliette what do you do with your friends?
  6. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  7. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  8. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  9. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  10. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  11. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  12. Raoul: a social object for Charlotte (3 year old)
  13. Jaiku’s Jyri Engeström's 5 rules for social networks: social objects 1. What is your object? 2. What are your verbs? 3. How can people share the objects? 4. What is the gift in the invitation? 5. Are you charging the publishers or the spectators?
  14. How do we socialize objects online without having to create yet another social network?
  15. Standards create markets: Hal Varian OpenSocial is a straightforward application of chapters 8 and 9 of his 1998 book quot;Information Rulesquot; “Standards change competition for a market to competition within a market” Network Effects Lock-In and Switching Costs Standards
  16. OpenSocial A common API for social applications across multiple web sites
  17. OpenSocial Foundation OpenSocial Foundation Keep the specification open Specifications discussed in public forum Spec evolves using an open source community process
  18. OpenSocial Containers friendster ®
  19. Standards-based html+javascript+REST+oauth
  20. Why should you care about OpenSocial? Developers: Distribution >275 Million users Containers: Features Users: More applications
  21. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  22. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  23. This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  24. A standard for everyone This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License
  25. How To Build OpenSocial Applications - Chris Schalk
  26. OpenSocial Client API JavaScript - version 0.7 production Standard Web development technologies HTML + Javascript Can integrate with 3rd party server REST Services Based on Atom publishing protocol AtomPub and JSON
  27. OpenSocial JavaScript API The core OpenSocial Services include People & Friends Access friends information programmatically Activities See what you’re friends are up to Share what you are doing Persistence Provide state without a server Share data with your friends
  28. People & Friends Example Requesting friend Info function getFriendData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest(VIEWER), 'viewer'); req.add(req.newFetchPeopleRequest(VIEWER_FRIENDS), 'viewerFriends'); req.send(onLoadFriends); }
  29. People & Friends Example Callback function for returned friend data function onLoadFriends(resp) { var viewer = resp.get('viewer').getData(); var viewerFriends = resp.get('viewerFriends').getData(); var html = 'Friends of ' + viewer.getDisplayName() + ‘:<br><ul>’; viewerFriends.each(function(person) { html += '<li>' + person.getDisplayName()+'</li>';}); html += '</ul>'; document.getElementById('friends').innerHTML = html; }
  30. Activities Example Posting an activity function postActivity(text) { var params = {}; params[opensocial.Activity.Field.TITLE] = text; var activity = opensocial.newActivity(params); opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority.HIGH, callback); } postActivity(quot;This is a sample activity, created at quot; + new Date().toString()) }
  31. Persistence Example Persisting data function populateMyAppData() { var req = opensocial.newDataRequest(); var data1 = Math.random() * 5; var data2 = Math.random() * 100; req.add(req.newUpdatePersonAppDataRequest(quot;VIEWERquot;, quot;AppField1quot;, data1)); req.add(req.newUpdatePersonAppDataRequest(quot;VIEWERquot;, quot;AppField2quot;, data2)); req.send(requestMyData); }
  32. Persistence Example Fetching persisted data function requestMyData() { var req = opensocial.newDataRequest(); var fields = [quot;AppField1quot;, quot;AppField2quot;]; req.add(req.newFetchPersonRequest( opensocial.DataRequest.PersonId.VIEWER), quot;viewerquot;); req.add(req.newFetchPersonAppDataRequest(quot;VIEWERquot;, fields), quot;viewer_dataquot;); req.send(handleReturnedData); }
  33. Persistence Example Displaying fetched (persisted) data function handleReturnedData(data) { var mydata = data.get(quot;viewer_dataquot;); var viewer = data.get(quot;viewerquot;); me = viewer.getData(); // me is global var var data = mydata[me.getId()]; htmlout += quot;AppField1: quot; + data[quot;AppField1quot;] + quot;<br/>quot;; htmlout += quot;AppField2: quot; + data[quot;AppField2quot;] + quot;<br/>quot;; var div = document.getElementById('content_div'); div.innerHTML = htmlout; }
  34. Demonstration - Building OpenSocial Applications using the JavaScript API
  35. Server-side REST Services Accessing People information /people/{guid}/@all -- Collection of all people connected to user {guid} /people/{guid}/@friends -- Collection of all friends of user {guid} -- subset of @all /people/{guid}/@self -- Profile record for user {guid} /people/@me/@self -- Profile record for requestor
  36. Server-side REST Services Accessing Activities information /activities/{guid}/@self -- Collection of activities generated by given user /activities/{guid}/@friends -- Collection of activities for friends of the given user {guid}
  37. Server-side REST Services Accessing Persistent data /appdata/{guid}/@self/{appid} -- All data for user {guid}, app {appid} /appdata/{guid}/@friends/{appid} -- All data for friends of user {guid} and app {appid}; read-only
  38. Server-side REST Services Additional query parameters format={format} -- Format desired; one of (atom, json); default is json fields={field+} -- List of fields to include in request startPage={startPage} -- Index into a paged collection count={count} -- Set page size for paged collection
  39. Demonstration - Using the OpenSocial REST Services
  40. OpenSocial ServerSide Integration Options In addition to using the provided persistence API... Establish a quot;homequot; site where gadget can phone home to retrieve, post data Can host home site on your own, or use services: Amazon EC2 Joyent Google AppEngine
  41. Google AppEngine and OpenSocial Create an App Engine app as your backend! Use makeRequest() to call back to your AppEngine server Utilize AppEngine's datastore New OpenSocial Apps are coming online BuddyPoke... Checkout Lane Liabraaten’s OpenSocial-AppEngine integration article Google IO Code Lab about OpenSocial Apps in the Cloud
  42. Resources For Application Developers Specification Code Samples and Tools Sandboxes
  43. OpenSocial Containers - Kevin Marks
  44. Containers provide a social context OpenSocial separates application logic from social context an app sees user ids - the container makes them people Users understand the social contract of the containers Save apps and users from re-registration hell
  45. Containers don’t choose users Containers set up the social model, users choose to join they grow through homophily and affinity Network effect can bring unexpected userbases
  46. OpenSocial gets you to all their users You don't have to pick a site to specialise for You get to spread through multiple friend groups You'll be surprised by where your users are so make sure you plan to localize
  47. Not just Social Network Sites Social network sites - Profiles and home pages Personal dashboards Sites based around a Social Object Corporate CRM systems Any web site How do we abstract these out? Viewer + friends Owner + friends
  48. The Viewer and Viewer friends
  49. Owner and Owner friends
  50. Owner and Viewer are defined by Container The Application gets IDs and connections to other IDs
  51. the Owner need not be a Person It could be an organisation or a social object
  52. Kinds of container - Social network sites Profile pages Owner is profile page owner Viewer may not be known, may be owner or other member Home pages Owner is Viewer (must be logged in to see) Examples MySpace Hi5 Orkut
  53. Kinds of container - Personal dashboard like Home pages Owner is Viewer (must be logged in to see) Friends may not be defined Example: iGoogle, My Yahoo
  54. Kinds of container - Social Object site Pages reflect the object - movie, picture, product Owner is the object Owner friends are people connected to the object may be authors or fans Viewer is looking at it, Viewer friends are people you may want to share with Example: Imeem is a bit like this - opportunity for sites like Flickr, YouTube
  55. Kinds of container - CRM systems Pages reflect the customer Owner is the customer Owner friends are people connected to the customer may be your colleagues, or other customers Viewer is you, Viewer friends are your colleagues or customers Example: Oracle CRM, Salesforce
  56. Kinds of container - Any web site Owner is the site Owner friends are site users Viewer is you, Viewer friends are your friends who have visited this site Example: Google Friend Connect will enable this for any site
  57. Container Sites control policy Check the Environment Getting information Viewer information may not be available or it may be hidden from you Call requestPermission API that can prompt the users Spreading your application Activities display under container control RequestSendMessage RequestShareApp Monetization and Installation Meet the Containers (next session) Best Practices for Spreading your App (tomorrow)
  58. Netlog demo
  59. Becoming an Open Social Container - Chris Schalk
  60. Becoming an OpenSocial Container Question: How do you become an OpenSocial container? Answer: Utilize existing Open Source container code. The Apache incubator project “Shindig” serves this purpose!
  61. Apache Shindig What is Shindig? Open source software that allows you to host OpenSocial applications Is currently an Apache Software Incubator project Heavy partner involvement (Ning, hi5 …) Serves as open source reference implementation of OpenSocial & gadgets technologies It’s Goal: “Shindig's goal is to allow new sites to start hosting social apps in well under an hour's worth of workquot;
  62. Apache Shindig Info... Apache Shindig Website
  63. Demonstration - Implementing your own container using Shindig
  64. SocialSite SocialSite is an Open Source project that allows you to turn your web application in an OpenSocial container Leverages Apache Shindig Built by Sun (Dave quot;Rollerquot; Johnson), announced at JavaOne this month Adds a database and widgets to manage your social network
  65. SocialSite Architecture Details at
  66. Summary OpenSocial is making the web more social The current version 0.7 is in production REST API and 0.8 coming soon Developers can start creating social applications today Orkut, Myspace, hi5, Netlog open to 200 M users now iGoogle, IDTail, Hyves, Imeem sandboxes Social sites: implement OpenSocial get Shindig and start planning SocialSite Friend Connect Advertisers: create brand advertising Apps now
  67. OpenSocial Sessions at Google I/O 12 sessions Building an OpenSocial Application, Focus on Client Side APIs Apache Shindig: Make Your Social Site an OpenSocial Container OpenSocial - Scaling and Analytics, Nuts & Bolts URLs Are People Too - Using the Social Graph API to Build a Social Web Fireside Chat: OpenSocial OpenSocial at MySpace: Creating popular apps on MySpace OpenSocial across Containers OpenSocial Specification: What's Next for OpenSocial Monetizing Application Traffic On Social Network OpenSocial, OpenID, and OAuth: Oh, My! Best Practices for Spreading Your App without Ruining the User Experience Building on the Promise of OpenSocial 2 code labs Make Your Social Site an OpenSocial Container Using Shindig Building an OpenSocial Application in the Cloud
  68. Q&A