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




 Apa...
The social web




      1995        1997     1999   2000   2001   2002   2003   2004   2005   2006   2007   2008




 Apa...
The social web



             Wikis         Blogs



      1995        1997        1999   2000   2001   2002   2003   200...
The social web
                                     blogger.com


                                                        ...
The social web
                                     blogger.com


                                                        ...
The social web
                                     blogger.com             Friendster    MySpace   Facebook



          ...
The social web
                                     blogger.com             Friendster    MySpace   Facebook
             ...
The social web
                                     blogger.com             Friendster    MySpace   Facebook
             ...
The social web
                                                                                                           ...
What is a Platform?
                           There are two interesting dictionary
                           definitions:...
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...
Social Network platform provides...




                           Authorization



 ApacheCon EU 2009
Thursday, March 26,...
Social Network platform provides...




                                       Profiles



 ApacheCon EU 2009
Thursday, Mar...
Social Network platform provides...




                            Relationships



 ApacheCon EU 2009
Thursday, March 26...
Social Network platform provides...




                                   Activities



 ApacheCon EU 2009
Thursday, Marc...
Social Network platform provides...




                           Shared applications



 ApacheCon EU 2009
Thursday, Mar...
is ...

 ApacheCon EU 2009
Thursday, March 26, 2009
OpenSocial is...




                            A “Standard” set of
                           Social Network APIs


 Apa...
OpenSocial is...




                            Write once, test
                            everywhere for
             ...
OpenSocial is...




                         Supported by
                    (just about) everybody
                    ...
OpenSocial defines...



 ApacheCon EU 2009
Thursday, March 26, 2009
OpenSocial defines...


                           Social Networking
                             platform APIs
           ...
OpenSocial defines...



                           APIs in several forms
                    •       JavaScript API
      ...
OpenSocial capabilities
                    • On behalf of an authenticated user:
                     • Retrieve detailed...
OpenSocial defines...


                            A JavaScript API for
                                  Gadgets
        ...
OpenSocial defines...


                    A JSON-RPC API for
                    Gadget-to-Server calls
                 ...
OpenSocial defines...


                                   REST API for
                               Server-to-Server cal...
Example Gadget code    Hello World

                     <?xml version="1.0" encoding="UTF-8" ?>
                         ...
Example Gadget code
                                     Friends 1/2

            <?xml version="1.0" encoding="UTF-8" ?>
...
Example Gadget code
                                      Friends 2/2


                   function response(dataResponse)...
Example REST API code (1/2)
                           posting an activity with OpenSocial


          // gather informati...
Example REST API code (2/2)
                           posting an activity with OpenSocial


               // create Open...
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, 20...
Reference
                           Implementation of
                              OpenSocial

 ApacheCon EU 2009
Thursd...
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 ...
OpenSocial
                           JavaScript container
                             implementation

                  ...
OpenSocial data server
                     implementation
                   with stub interfaces

                      ...
Shindig is not a
                           complete solution


 ApacheCon EU 2009
Thursday, March 26, 2009
Who provides what
                                                                                    Your application pro...
Integrating Shindig
                           into your blog or wiki


 ApacheCon EU 2009
Thursday, March 26, 2009
Why integrate Shindig?

                    • You want social features like
                     • Profile Pages
          ...
But... adding social
                           features not so easy


 ApacheCon EU 2009
Thursday, March 26, 2009
How to integrate
                  •        Easy
                           •   Add Shindig Servlets & Filters
           ...
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 So...
SocialSite architecture
                                Your Web Application                                       SocialS...
Authentication Delegation
                                      Gadget in a                    Authentication             ...
How to use SocialSite
            • Install SocialSite server on Tomcat, Glassfish, etc.
            • Create Authenticatio...
Social Roller & JSP Wiki



 ApacheCon EU 2009
Thursday, March 26, 2009
Social Blogs & Wikis

                    • Social Dashboard in Blog server
                    • Personal Profile pages wi...
Demo...


                    • Steps to setup SocialSite and include
                           Gadgets in pages of a Rol...
Demo...

                    • Social features in Roller
                     • Dashboard with friending, messages, etc.
 ...
Social Roller: an Open
                       Social Application
                    • An example OpenSocial Application
 ...
Social Roller’s two parts

                    • An Open Social Gadget that allows you to
                           autho...
Social Roller & OAuth




 ApacheCon EU 2009
Thursday, March 26, 2009
Demo...


                    • Social features in Roller
                    • Social features in JSPWiki


 ApacheCon EU...
Summary
                 • The web is going social
                 • OpenSocial provides a standard API
                 ...
Upcoming SlideShare
Loading in...5
×

Shindig for Blogs and Wikis

2,901

Published on

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

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,901
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
68
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Shindig for Blogs and Wikis

  1. 1. Shindig for Blogs & Wikis Dave Johnson ApacheCon EU 2009 Thursday, March 26, 2009
  2. 2. 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
  3. 3. Social networking as a platform ApacheCon EU 2009 Thursday, March 26, 2009
  4. 4. The social web 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  5. 5. The social web 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  6. 6. The social web Wikis Blogs 1995 1997 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 ApacheCon EU 2009 Thursday, March 26, 2009
  7. 7. 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
  8. 8. 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
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. 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
  13. 13. 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
  14. 14. What’s in a social networking platform? ApacheCon EU 2009 Thursday, March 26, 2009
  15. 15. Social Network platform provides... Authentication ApacheCon EU 2009 Thursday, March 26, 2009
  16. 16. Social Network platform provides... Authorization ApacheCon EU 2009 Thursday, March 26, 2009
  17. 17. Social Network platform provides... Profiles ApacheCon EU 2009 Thursday, March 26, 2009
  18. 18. Social Network platform provides... Relationships ApacheCon EU 2009 Thursday, March 26, 2009
  19. 19. Social Network platform provides... Activities ApacheCon EU 2009 Thursday, March 26, 2009
  20. 20. Social Network platform provides... Shared applications ApacheCon EU 2009 Thursday, March 26, 2009
  21. 21. is ... ApacheCon EU 2009 Thursday, March 26, 2009
  22. 22. OpenSocial is... A “Standard” set of Social Network APIs ApacheCon EU 2009 Thursday, March 26, 2009
  23. 23. OpenSocial is... Write once, test everywhere for social applications ApacheCon EU 2009 Thursday, March 26, 2009
  24. 24. OpenSocial is... Supported by (just about) everybody but Facebook ApacheCon EU 2009 Thursday, March 26, 2009
  25. 25. OpenSocial defines... ApacheCon EU 2009 Thursday, March 26, 2009
  26. 26. OpenSocial defines... Social Networking platform APIs • Authentication • Authorization • Profiles • Relationships • Activities • Shared applications ApacheCon EU 2009 Thursday, March 26, 2009
  27. 27. 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
  28. 28. 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
  29. 29. 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
  30. 30. 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
  31. 31. 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
  32. 32. 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
  33. 33. 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
  34. 34. 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
  35. 35. 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
  36. 36. 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
  37. 37. Options for social blogs and wikis ApacheCon EU 2009 Thursday, March 26, 2009
  38. 38. Use a social software suite or a service ApacheCon EU 2009 Thursday, March 26, 2009
  39. 39. Hook into an existing social network ApacheCon EU 2009 Thursday, March 26, 2009
  40. 40. ApacheCon EU 2009 Thursday, March 26, 2009
  41. 41. There are other options... ApacheCon EU 2009 Thursday, March 26, 2009
  42. 42. Apache Shindig* is... * incubating ApacheCon EU 2009 Thursday, March 26, 2009
  43. 43. Reference Implementation of OpenSocial ApacheCon EU 2009 Thursday, March 26, 2009
  44. 44. Open Source! and in the ApacheCon EU 2009 Thursday, March 26, 2009
  45. 45. Active and growing! ApacheCon EU 2009 Thursday, March 26, 2009
  46. 46. In production ApacheCon EU 2009 Thursday, March 26, 2009
  47. 47. Apache Shindig* provides... * incubating ApacheCon EU 2009 Thursday, March 26, 2009
  48. 48. Google Gadgets server with all Features *in Java and PHP ApacheCon EU 2009 Thursday, March 26, 2009
  49. 49. OpenSocial JavaScript container implementation * in JavaScript. Duh! ApacheCon EU 2009 Thursday, March 26, 2009
  50. 50. OpenSocial data server implementation with stub interfaces *in Java and PHP ApacheCon EU 2009 Thursday, March 26, 2009
  51. 51. Shindig is not a complete solution ApacheCon EU 2009 Thursday, March 26, 2009
  52. 52. 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
  53. 53. Integrating Shindig into your blog or wiki ApacheCon EU 2009 Thursday, March 26, 2009
  54. 54. Why integrate Shindig? • You want social features like • Profile Pages • Friending • Activities • And / or you want Gadgets ApacheCon EU 2009 Thursday, March 26, 2009
  55. 55. But... adding social features not so easy ApacheCon EU 2009 Thursday, March 26, 2009
  56. 56. 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
  57. 57. There’s a better way... ApacheCon EU 2009 Thursday, March 26, 2009
  58. 58. Social blogs & wikis with Project SocialSite ApacheCon EU 2009 Thursday, March 26, 2009
  59. 59. SocialSite is... ApacheCon EU 2009 Thursday, March 26, 2009
  60. 60. 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
  61. 61. 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
  62. 62. 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
  63. 63. 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
  64. 64. Social Roller & JSP Wiki ApacheCon EU 2009 Thursday, March 26, 2009
  65. 65. 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
  66. 66. Demo... • Steps to setup SocialSite and include Gadgets in pages of a Roller blog ApacheCon EU 2009 Thursday, March 26, 2009
  67. 67. 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
  68. 68. 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
  69. 69. 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
  70. 70. Social Roller & OAuth ApacheCon EU 2009 Thursday, March 26, 2009
  71. 71. Demo... • Social features in Roller • Social features in JSPWiki ApacheCon EU 2009 Thursday, March 26, 2009
  72. 72. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×