Open Social Introduction - JUG SummerCamp 2010

952 views
896 views

Published on

A quick introduction to OpenSocial API and Social Applications

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
952
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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 />

×