More details at http://wordpress.chanezon.com/?p=29
Today Kevin Marks (Google), Chris Schalk (Google), Lou Moore (Hi5) and myself presented OpenSocial at the Graphing Social Patterns West 2008 conference.
GSP is a great conference to talk about OpenSocial: all the attendees are involved in some sort of social networking software, and are very receptive to OpenSocial. Congrats to Dave McClure and the O’Reilly team for organizing it.
It was a great opportunity to have the 3 OpenSocial developer advocates from Google on stage at the same time, usually we all travel to different conferences. I made an introduction about OpenSocial, Chris described the API, showed code and did a demo of PixWall on Orkut, Kevin talked about Shindig and Caja, and demoed Shindig working in the Eclipse debugger.
And Lou Moore from Hi5 showed all the cool extensions to OpenSocial that Hi5 has made: for example he demoed PixWall taking advantage of the Photo API that Hi5 makes available, that allows an application developer to let the user pick a picture from one of their Hi5 Photo albums. Thanks Lou.
14. 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?
http://tinyurl.com/yus8gw
15. How do we socialize objects
online
without having to create yet
another social network?
16.
17.
18.
19.
20.
21. OpenSocial
A common open set of APIs for
building social applications across
multiple sites
22. This is NOT GoogleSocial.
It’s about making the Web more
social, not just Google.
46. How does it work?
10 minutes to an OpenSocial app
47. One API, Many Websites
One API
client-side JavaScript - version 0.7 ready for production
standard Web development tools: HTML + Javascript
server optional
server-side REST (initial proposal under review)
Google proposal based on Atom Publishing Protocol
AtomPub and JSON
Many Websites
every OpenSocial website exposes the same API
==> more users for every app
==> more apps for every user
48. Core Services
People (quot;who I amquot;, quot;who are my friendsquot;)
Activities (quot;what I'm doingquot;)
Persistence (state without a server)
49. Core Services - People
Getting info on you and your friends...
/**
* Request for friend info when the page loads.
*/
function getData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(VIEWER), 'viewer');
req.add(req.newFetchPeopleRequest(VIEWER_FRIENDS),'viewerFriends');
req.send(onLoadFriends);
};
50. Core Services - People
Getting info on you and your friends...
/**
* Callback function for returned friend data.
*/
function onLoadFriends(response) {
var viewer = response.get('viewer').getData();
var html = 'Friends of ' + viewer.getDisplayName();
html += ':<br><ul>';
var viewerFriends = response.get('viewerFriends').getData();
viewerFriends.each(function(person) {
html += '<li>' + person.getDisplayName() + '</li>';});
html += '</ul>';
document.getElementById('message').innerHTML = html;
};
51. Core Services - Activities
Posting an Activity...
/**
* Posting a simple activity
*/
function postActivity(text) {
var params = {};
params[opensocial.Activity.Field.TITLE] = text;
var activity = opensocial.newActivity(params);
opensocial.requestCreateActivity(activity,
opensocial.CreateActivityPriority.HIGH, callback);
};
52. Core Services - Activities
Posting an Activity...
/**
* Displaying an activity
*/
function callback(data) {
var title = data.getField(opensocial.Activity.Field.TITLE);
title = gadgets.util.unescapeString(title);
div.innerHTML = title;
};
53. Core Services - Persistence
Requesting to persist data
/**
* Storing 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);
};
54. Core Services - Persistence
Fetching the persisted data
/**
* Fetching 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);
}
55. Core Services - Persistence
Displaying the fetched (persisted) data
/**
* Displaying 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;
}
58. Caja - when gadgets go bad
Gadgets can be a new vector for phishing, spam, malware
Social spread of gadgets can spread bad gadgets too
Caja reduces threats with a JavaScript sanitizer as an
additional quot;sandboxquot; on top of iFrames protection
59. Caja Javascript sanitizer
Capability-based Javascript sanitizer
Open Source project from Google
Optional but recommended for OpenSocial containers
Eventually will be secure enough to run gadgets inline
instead of in iframes
60. Who should care about Caja?
OpenSocial Containers can require Caja's extra security,
Gadgets that cannot be Cajoled could show users an extra
warning.
Developers of OpenSocial gadgets should test as Cajoled
gadgets, or face warnings.
Users, containers and developers will gain from Cajoled
gadgets without iFrames later
61. Shindig: What is it?
Apache Software Foundation project
Brian McCallister from Ning championed
Open source reference implementation of
OpenSocial + Gadgets stack
Goal:
Launch a new (simple) container in under an
hour’s worth of work
62. Shindig: Components
Gadget Container JavaScript
Core gadgets JavaScript environment
Gadget Server
Renders gadget XML (i.e. gmodules.com)
OpenSocial Container JavaScript
JavaScript environment for people, activities, persistence
OpenSocial Gateway Server
RESTful API server
63. Code Status
Java and Javascript running now
Googlers have contributed:
Java Gadget Server
Gadget Container JavaScript
OpenSocial Container JavaScript
PHP Gadget Server contributed by Ning
PHP recently rewritten to match Java
Looking for Ruby, Python, Perl, C#, etc.
65. Conclusion: it's time to get coding!
OpenSocial is making the web more social
The current version 0.7 is in production
Developers can start creating social applications today
Orkut sandbox, Hi5, Plaxo, Ning, and MySpace
Orkut, Myspace, Hi5 open to consumers soon
Social sites: implement OpenSocial
get Shindig and start planning
68. hi5 Platform
About hi5
Developer Console
Integration Points
Application Discovery
hi5 OpenSocial Extensions
Why Develop for hi5?
Roadmap
Demo
69. hi5 - Dominant Global Social Network
We are one of the largest web sites in the world (#8 on Alexa)
and the most global of all the social networking sites.
Over 80+ million registered members and ~40 million WW
unique users
Most popular Spanish-speaking social network in the world
Top 10 in Latin America
Mexico, Colombia, Bolivia, Guatemala, Peru, Costa Rica,
Nicaragua, Honduras, Ecuador, El Salvador
Top 10 in Rest of the World
Portugal, Greece, Romania, Cyprus, Thailand, Jamaica, Sri
Lanka, Kuwait, Jordan, Oman
70. Hi5’s Demographics
Broad reach across major demos:
18 to 34 primary
Roughly 50%split male/female
US traffic: significant percentage is Hispanic
Diverse traffic from Europe (25%), North America (15%)
and Central & South America (31%), Asia (21%)
Offered in 15 languages
Grew big in most international countries with English first
and then translated
Members use the site primarily to keep in touch with their
friends. Users have limited self-expression tools - skins,
widgets, etc.
71. Developer Console
Add and manage applications
Refresh metadata from gadget prefs
Manage other developers
Manage API Keys
Submit applications to the hi5 directory
hi5 Developer Blog feed
Simple in-line application editor
View analytics for live applications
77. Application Discovery
Application Directory
Categories, sorting and filtering
Application Homepage
My Friends' applications
Other recommendations
Manage your applications
Viral Channels
Friend Updates
Notifications
Invites
Email (limited to 1 per user per app per day)
80. Friend Updates
On both homepage and profile page
Created using the OpenSocial Activity API (requestCreateActivity)
Publication not guaranteed but typically high (> 80%)
81. Notifications
Sent using the OpenSocial request* API. (requestSendMessage,
type=NOTIFICATION)
Limited to 5 per user per app per day
82. Invites
All apps have built-in invite flow from profile and canvas pages
We will offer limited or no ability to redirect users to invite
83. hi5 OpenSocial Extensions API
An optional feature that provides access to additional hi5-
specific functionality
New data requests
Photos (hi5.fetchAlbumsDataRequest)
Online Presence (hi5.fetchPresenceRequest)
Status (hi5.fetchStatusRequest)
New fields
Link for friend update media (hi5.ActivityMediaItemField.
LINK)
More image sizes(hi5.ProfileField.SMALL_IMG_URL,
etc)
Simple template/tag library
More to come!!
84. More reasons to develop for hi5...
A new audience via our unique footprint in Latin America,
Europe and Asia
Of the more than 80 million individuals registered with
hi5, less than a third are also active on the other leading
social networks, incl. FB, MyS, Bebo, Friendster
(comscore)
OpenSocial!
Because hi5 is a founding adopter of OpenSocial,
developers’ apps can be deeply embedded within hi5, as
well as easily translated beyond hi5 to other OpenSocial-
enabled websites as well – further increasing their reach
potential by many millions!
85. More reasons to develop for hi5...
$$$
A dedicated canvas page that can be monetized
Promotions on the hi5 blog (one developer post/mo –
rotating among our registered developers with popular
apps)
Free Infrastructure from Joyent
hi5 Developers could win one year of Joyent’s Free
Accelerator™ scalable, on-demand infrastructure for
their hi5 app!
Limited number at launch, more to come
86. hi5 Platform Roadmap
Several hundred apps in our sandbox that we are reviewing
and working with developers to finalize.
White-list style approach to ensure app quality and user-
centric relevancy (guidelines to be published this week)
March 15th Hackathon
Hosted at the Google Campus in Mountain View, geared
towards helping developers finalize their applications for launch.
March 31st Public Launch
Public rollout begins! We'll launch with as many applications
that have met our guidelines and are ready to go live.
87. Demo
PixWall, by PixVerse on hi5
http://lou.sandbox.hi5.com/friend/apps/entry/gs1.rs.pixverse.com:15900/hi5pixwall/gadget
88. Resources For Container Developers
Specification
http://code.google.com/apis/opensocial/
For container developers
http://incubator.apache.org/shindig/
http://code.google.com/p/google-caja
Pat's delicious feed: http://del.icio.us/chanezon/opensocial
89. Resources For Application Developers
Specification
http://code.google.com/apis/opensocial/
REST API: http://groups.google.com/group/opensocial-and-
gadgets-spec
Code Samples and Tools
http://code.google.com/p/opensocial-resources/
Sandboxes
http://developer.myspace.com/
http://www.hi5networks.com/developer/
http://opensocial.ning.com/
http://pulse.plaxo.com/pulse/gadgets/
http://code.google.com/apis/orkut/
Pats delicious feed: http://del.icio.us/chanezon/opensocial