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.

Open Social Introduction - JUG SummerCamp 2010

1,016 views

Published on

A quick introduction to OpenSocial API and Social Applications

  • Be the first to comment

Open Social Introduction - JUG SummerCamp 2010

  1. 1. Open Social: Introduction<br />JeremiJoslin, eXo Evangelist<br />Tugdual Grall, VP of Products<br />
  2. 2. eXo Platform 3.0<br />
  3. 3. Social Networks :<br /> From a developer point of view<br />
  4. 4. Social Networks<br />Who I am ?<br />Who I know?<br />What’sgoing on?<br />Thanks to Chris Messina<br />
  5. 5. Social Networks<br />Identity<br />Relationships<br />Activities<br />Thanks to Chris Messina<br />
  6. 6. Identity<br />
  7. 7. Relationships<br />
  8. 8. Activities<br />
  9. 9. Developing Social Applications<br />
  10. 10. OpenSocial<br />A common API for social applications<br />across multiple Web sites<br />
  11. 11. WhatisOpenSocial?<br />Social Data and API<br />Social Data: People, Groups, Activities, Messages, AppData<br />JavaScript API for Gadgets<br />REST and RPC API<br />Gadgets Container and API<br />Code in HTML, CSS, and JavaScript<br />Rich JavaScript libraries (IO, preferences, views, i18n,…)<br />Run in the browser, served by a container<br />
  12. 12. OpenSocial Containers<br />
  13. 13. eXo Platform & eXo Social<br />Apache Shindig, the OpenSocial RI, isembedded in eXo Platform<br />GateInbrings the gadgets support<br />Gadget Rendering in user Dashboard and WrapperPortlet)<br />Gadget storage and management<br />Gadget Develomentusing eXo IDE<br />eXo Social module brings the Social features<br />People, Relationships, Activities<br />Spaces/Groups<br />Java, REST & RPC API<br />
  14. 14. OpenSocial Development<br />
  15. 15. Gadgets<br />Gadget Definition<br /><?xml version="1.0" encoding="UTF-8"?><br /><Module><br /> <ModulePrefstitle="Gifts part 3 - Showing Gifts"><br /> <Requirefeature="opensocial-0.8"/><br /> </ModulePrefs><br /> <Content type="html"><br /> <![CDATA[ <br /> <script type="text/javascript"><br />functionupdateGiftList(viewer, data, friends) {<br /> var json = null;<br /> ...<br />document.getElementById('given').innerHTML = html.join('');<br /> }<br />gadgets.util.registerOnLoadHandler(init);<br /> </script><br /> <div id='main'><br /> <div id='give'><br /> <form id='gift_form'><br />Give <span id='gifts'></span> to <span id='friends'></span>. <a href=‘..’>Give!</a><br /> </form><br /> </div><br /> <div id='given'></div><br /> </div><br /> ]]><br /> </Content><br /></Module><br />
  16. 16. OpenSocial API<br />Example: GetFriends Data<br />functionloadFriends() {<br /> var req = opensocial.newDataRequest();<br />req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER), 'viewer');<br /> var viewerFriends = opensocial.newIdSpec({ "userId" : "VIEWER", "groupId" : "FRIENDS" });<br /> var opt_params = {};<br />opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 100;<br />req.add(req.newFetchPeopleRequest(viewerFriends, opt_params), 'viewerFriends');<br />req.send(onLoadFriends);<br /> }<br />functiononLoadFriends(data) {<br /> var viewer = data.get('viewer').getData();<br /> var viewerFriends = data.get('viewerFriends').getData();<br /> html = new Array();<br />html.push('<ul>');<br />viewerFriends.each(function(person) {<br /> if (person.getId()) {<br />html.push('<li>', person.getDisplayName(), '</li>');<br /> }<br /> });<br />html.push('</ul>');<br />document.getElementById('friends').innerHTML = html.join('');<br />gadgets.window.adjustHeight();<br /> }<br />
  17. 17. Demonstration<br />Developing Gadgets using eXo Platform<br />
  18. 18. Architecture<br />Application<br />
  19. 19. Authentication<br />Should not use « login/password » or <br />oAuth<br />SignedRequest<br />
  20. 20. Authentication<br />
  21. 21. Questions?<br />

×