Shindig for Blogs and Wikis
Upcoming SlideShare
Loading in...5
×
 

Shindig for Blogs and Wikis

on

  • 4,028 views

ApacheCon EU 2009 presentation on using Shindig to add social features to blogs, wikis and other web applications

ApacheCon EU 2009 presentation on using Shindig to add social features to blogs, wikis and other web applications

Statistics

Views

Total Views
4,028
Views on SlideShare
4,012
Embed Views
16

Actions

Likes
2
Downloads
67
Comments
0

2 Embeds 16

http://www.slideshare.net 15
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Shindig for Blogs and Wikis Shindig for Blogs and Wikis Presentation Transcript

  • Shindig for Blogs & Wikis Dave Johnson ApacheCon EU 2009 Thursday, March 26, 2009
  • Agenda • Social networking as a platform • What OpenSocial is and what it provides • Options for social blogs & wikis • What Shindig is and what it provides • Integrating Shindig into your blog or wiki • Social blogs & wikis with Project SocialSite ApacheCon EU 2009 Thursday, March 26, 2009
  • Social networking as a platform ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web Wikis Blogs 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web blogger.com Wordpress JSPWiki LiveJournal Wikis Blogs 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web blogger.com Wordpress JSPWiki LiveJournal Wikis Blogs RSS 0.9 RSS 1.0 RSS 2.0 AtomPub 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web blogger.com Friendster MySpace Facebook Wordpress JSPWiki LiveJournal Wikis Blogs RSS 0.9 RSS 1.0 RSS 2.0 AtomPub 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web blogger.com Friendster MySpace Facebook twitter Flickr dopplr Wordpress JSPWiki LiveJournal del.icio.us Wikis Blogs RSS 0.9 RSS 1.0 RSS 2.0 AtomPub 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web blogger.com Friendster MySpace Facebook twitter Flickr dopplr Wordpress JSPWiki LiveJournal del.icio.us Wikis Blogs RSS 0.9 RSS 1.0 RSS 2.0 AtomPub 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • The social web Your Friendster MySpace Facebook blogger.com twitter site! Flickr dopplr Wordpress JSPWiki LiveJournal del.icio.us Wikis Blogs RSS 0.9 RSS 1.0 RSS 2.0 AtomPub 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  • What is a Platform? There are two interesting dictionary definitions: "a raised horizontal surface of wood, stone or metal" or "a statement of principals and policies, especially of a political party." I think both definitions contain elements of what makes something a platform. - Dave Winer ApacheCon EU 2009 Thursday, March 26, 2009
  • What’s in a social networking platform? ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Network platform provides... Authentication ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Network platform provides... Authorization ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Network platform provides... Profiles ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Network platform provides... Relationships ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Network platform provides... Activities ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Network platform provides... Shared applications ApacheCon EU 2009 Thursday, March 26, 2009
  • is ... ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial is... A “Standard” set of Social Network APIs ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial is... Write once, test everywhere for social applications ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial is... Supported by (just about) everybody but Facebook ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial defines... ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial defines... Social Networking platform APIs • Authentication • Authorization • Profiles • Relationships • Activities • Shared applications ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial defines... APIs in several forms • JavaScript API • For Gadgets with I/O, authentication, batching, etc. • JSON-RPC API • For Gadget-to-Server communication • REST API • For Server-to-Server communication • Template Language • For use in Gadgets ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial capabilities • On behalf of an authenticated user: • Retrieve detailed profile information • Retrieve lists of friends • Retrieve lists of groups • CRUD on Activities • CRUD on App Data ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial defines... A JavaScript API for Gadgets Your A gadget is Gadget defined by XML file that with: - metadata ... - HTML/CSS opensocial - JavaScript core.io views core tabs Google Gadgets API & extensions JavaScript Container (sits in a web page) ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial defines... A JSON-RPC API for Gadget-to-Server calls Social Network Service Your Gadget People JSON-RPC Activities end-point opensocial core.io App Data views core tabs Google Gadgets API & extensions JavaScript Container (sits in a web page) ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial defines... REST API for Server-to-Server calls Social Network Service Your Your REST Gadget end-point Proxy People Your JSON-RPC REST Server opensocial Activities end-point end-point core.io views core tabs App Data Google Gadgets API & extensions JavaScript Container (sits in a web page) OpenSocial REST API - Based in AtomPub - With XML and JSON - OAuth authentication - No batch support (yet) ApacheCon EU 2009 Thursday, March 26, 2009
  • Example Gadget code Hello World <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Hello World!"> <Require feature="opensocial-0.8" /> </ModulePrefs> <Content type="html"> <![CDATA[ Hello, world! ]]> </Content> </Module> ApacheCon EU 2009 Thursday, March 26, 2009
  • Example Gadget code Friends 1/2 <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="List Friends Example"> <Require feature="opensocial-0.8"/> </ModulePrefs> <Content type="html"> <![CDATA[ <script type="text/javascript"> function request() { var idspec = opensocial.newIdSpec({ "userId" : "OWNER", "groupId" : "FRIENDS" }); var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest( opensocial.IdSpec.PersonId.OWNER), "get_owner"); req.add(req.newFetchPeopleRequest(idspec), "get_friends"); req.send(response); }; ApacheCon EU 2009 Thursday, March 26, 2009
  • Example Gadget code Friends 2/2 function response(dataResponse) { var owner = dataResponse.get('get_owner').getData(); var friends = dataResponse.get('get_friends').getData(); var html = 'Friends of ' + owner.getDisplayName(); html += ':<br><ul>'; friends.each(function(person) { html += '<li>'+person.getDisplayName()+'</li>'; }); html += '</ul>'; document.getElementById('message').innerHTML = html; }; gadgets.util.registerOnLoadHandler(request); </script> <div id="message"></div> ]]> </Content> </Module> ApacheCon EU 2009 Thursday, March 26, 2009
  • Example REST API code (1/2) posting an activity with OpenSocial // gather information needed for call def userId = "roller"; def restUri = "http://example.com/social/social/rest"; def consumerKey = "f8794f974bd03644f60f59d8fbe44a5f"; def consumerSecret = "4b31a601-9299-4709-9faa-c5134d278a87"; def reqUri = "http://example.com/social/oauth/requestToken"; def authzUri = "http://example.com/social/oauth/authorize"; def accessUri = "http://example.com/social/oauth/accessToken"; // use OAuth capable REST client (I wrote my own) def strategy = new OAuthStrategy(userId, consumerKey, consumerSecret, reqUri, authzUri, accessUri); def rest = new RestClientImpl(strategy); ApacheCon EU 2009 Thursday, March 26, 2009
  • Example REST API code (2/2) posting an activity with OpenSocial // create OpenSocial Activity in JSON form JSONObject activityData = new JSONObject(); activityData.put("title", "This is an activity title"); activityData.put("body", "This is an activity body"); // fetch XRDS file by calling restUri with header: // “Accepts: application/xrds+xml" // use that to figure the Activity collection URI // post activity to Activity collection URI response = rest.post("${restUri}/activities/${userId}/@self", null, null, activityData.toString(), "application/json"); ApacheCon EU 2009 Thursday, March 26, 2009
  • Options for social blogs and wikis ApacheCon EU 2009 Thursday, March 26, 2009
  • Use a social software suite or a service ApacheCon EU 2009 Thursday, March 26, 2009
  • Hook into an existing social network ApacheCon EU 2009 Thursday, March 26, 2009
  • ApacheCon EU 2009 Thursday, March 26, 2009
  • There are other options... ApacheCon EU 2009 Thursday, March 26, 2009
  • Apache Shindig* is... * incubating ApacheCon EU 2009 Thursday, March 26, 2009
  • Reference Implementation of OpenSocial ApacheCon EU 2009 Thursday, March 26, 2009
  • Open Source! and in the ApacheCon EU 2009 Thursday, March 26, 2009
  • Active and growing! ApacheCon EU 2009 Thursday, March 26, 2009
  • In production ApacheCon EU 2009 Thursday, March 26, 2009
  • Apache Shindig* provides... * incubating ApacheCon EU 2009 Thursday, March 26, 2009
  • Google Gadgets server with all Features *in Java and PHP ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial JavaScript container implementation * in JavaScript. Duh! ApacheCon EU 2009 Thursday, March 26, 2009
  • OpenSocial data server implementation with stub interfaces *in Java and PHP ApacheCon EU 2009 Thursday, March 26, 2009
  • Shindig is not a complete solution ApacheCon EU 2009 Thursday, March 26, 2009
  • Who provides what Your application provides User Interface Shindig provides Profile Group Home Pages Pages Pages Your Web Application Proxy Persistence Gadgets Gadget Renderer Activities People interface Table JSON-RPC end-point People Table Activities interface REST App Data Table end-point App Data interface ApacheCon EU 2009 Thursday, March 26, 2009
  • Integrating Shindig into your blog or wiki ApacheCon EU 2009 Thursday, March 26, 2009
  • Why integrate Shindig? • You want social features like • Profile Pages • Friending • Activities • And / or you want Gadgets ApacheCon EU 2009 Thursday, March 26, 2009
  • But... adding social features not so easy ApacheCon EU 2009 Thursday, March 26, 2009
  • How to integrate • Easy • Add Shindig Servlets & Filters • Implement security token • Add Shindig Container to pages • Not so easy • Add user interface for friending, groups, etc. • Add social data to your application ApacheCon EU 2009 Thursday, March 26, 2009
  • There’s a better way... ApacheCon EU 2009 Thursday, March 26, 2009
  • Social blogs & wikis with Project SocialSite ApacheCon EU 2009 Thursday, March 26, 2009
  • SocialSite is... ApacheCon EU 2009 Thursday, March 26, 2009
  • SocialSite is... • A centralized Social Graph Server • Persistent Social Graph • Headless except for Admin Console • Web services • Full support for all OpenSocial APIs • Extensions for comprehensive Social Graph access • A set of Gadgets • Complete Social Networking UI in OpenSocial Gadget form • Profile, Profile Editor, Groups, Friends, Dashboard and more ApacheCon EU 2009 Thursday, March 26, 2009
  • SocialSite architecture Your Web Application SocialSite Server SocialSite Admin Console Your application's REST API OpenSocial /SocialSite REST API Persistent Social Graph SocialSite Proxy SocialSite Profile Face Widget Widget SocialSite Gadgetizer OpenSocial /SocialSite SocialSite JSON-RPC API Friends Gadget #1 Widget Gadget #1 ApacheCon EU 2009 Thursday, March 26, 2009
  • Authentication Delegation Gadget in a Authentication SocialSite social-enabled Delegate at Server Web application example.com Gadget requests social data, passes assertions of page owner and page viewer SocialSite asks for confirmation of assertions Server checks list of trusted Authentication Assertions sent Delegates Delegate confirms assertions in JSON format SocialSite returns data requested { <rules> 'timeout': 30, <rule> 'assertions': { <sources> 'containerId': <direct> 'rollerweblogger.org', http://example.com/ss.jsp 'viewer': 'otto', </direct> 'owner': 'otto', </sources> } <assertions> } <accept>*</accept> </assertions> </rule> </rules> ApacheCon EU 2009 Thursday, March 26, 2009
  • How to use SocialSite • Install SocialSite server on Tomcat, Glassfish, etc. • Create Authentication Delegate page • Configure Authentication Delegate page • Add SocialSite Context and Gadgets to the pages of your web application • Create Gadgets to interact with your application ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Roller & JSP Wiki ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Blogs & Wikis • Social Dashboard in Blog server • Personal Profile pages within Blog server • Group Profile pages within Wiki server • Posting of activities for blog posts For more details and screenshots: http://rollerweblogger.org/roller/entry/socialsite_on_rollerwebloggerorg ApacheCon EU 2009 Thursday, March 26, 2009
  • Demo... • Steps to setup SocialSite and include Gadgets in pages of a Roller blog ApacheCon EU 2009 Thursday, March 26, 2009
  • Demo... • Social features in Roller • Dashboard with friending, messages, etc. • Profile page with variety of gadgets • Social features in JSPWiki • Group profile page ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Roller: an Open Social Application • An example OpenSocial Application • Can be installed into a Profile in Roller • Posts an Activity for each blog you post • Uses OAuth for all authentication For more details and source code: http://rollerweblogger.org/roller/entry/oauth_everywhere http://rollerweblogger.org/roller/entry/oauth_everywhere_continued ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Roller’s two parts • An Open Social Gadget that allows you to authorize the App to post to your Profile • A Roller Task that uses the OpenSocial REST API to post activities ApacheCon EU 2009 Thursday, March 26, 2009
  • Social Roller & OAuth ApacheCon EU 2009 Thursday, March 26, 2009
  • Demo... • Social features in Roller • Social features in JSPWiki ApacheCon EU 2009 Thursday, March 26, 2009
  • Summary • The web is going social • OpenSocial provides a standard API • Options for blogs and wikis, easiest to hardest • Friend Connect • SocialSite • Shindig ApacheCon EU 2009 Thursday, March 26, 2009