42

Opensocial Haifa Seminar - 2008.04.08

  • View
    5.055

  • Download
    2

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Opensocial Haifa Seminar - 2008.04.08
Page 2: Opensocial Haifa Seminar - 2008.04.08

Introducing OpenSocial

“Building Social applications with OpenSocial”

Ari Leichtberg

Software EngineerGoogle

Page 3: Opensocial Haifa Seminar - 2008.04.08

3

Agenda

• What is OpenSocial and Why is it important?

• A Technical Overview of OpenSocial• JavaScript APIs• Container Software - Shindig• REST APIs

• Where to find more information on OpenSocial

Page 4: Opensocial Haifa Seminar - 2008.04.08

4

Agenda

• What is OpenSocial and Why is it important?

• A Technical Overview of OpenSocial• JavaScript APIs• Container Software - Shindig• REST APIs

• Where to find more information on OpenSocial

Page 5: Opensocial Haifa Seminar - 2008.04.08

5

What is OpenSocial?

• OpenSocial is a set of common APIs for building social applications across the web

• It is being developed by Google in conjunction with partners from the Web/Social Application development community

Page 6: Opensocial Haifa Seminar - 2008.04.08

6

Why OpenSocial is Important?

• The Web is better when it's social

• Isn’t the Web social already?

• 100s of millions of users already have signed up for social networks around the world

• That’s great, but we believe it can get better

Page 7: Opensocial Haifa Seminar - 2008.04.08

7

The problem of social network development

As each social website opens its environment to developers, it exposes an API

“.. But what if you want to build an application that will run on multiple social websites?”

Problem: Developers have to learn multiple APIs to publish in multiple environments

Solution: OpenSocial allows developers to write applications to a common standard API that will run on multiple websites!

Page 8: Opensocial Haifa Seminar - 2008.04.08

8

OpenSocial solves this problem

Page 9: Opensocial Haifa Seminar - 2008.04.08

9

OpenSocial solves this problem

Page 10: Opensocial Haifa Seminar - 2008.04.08

10

What can OpenSocial do for the Web?

• It’s about more, more, more • More applications can be built by developers• More websites can run these applications• More users can use these applications

For Web developers this equates to distribution, distribution, distribution!

Page 11: Opensocial Haifa Seminar - 2008.04.08

11

OpenSocial is not GoogleSocial

• Making the web more social, not just Google

• The evolution of OpenSocial…

“Working with open standards and open partners in a collaborative fashion to build the best technology”

• Engineers and developers talking to engineers and developers

Page 12: Opensocial Haifa Seminar - 2008.04.08

12

OpenSocial in the US

Pictures of hackerthon

Partner Hackathon at SixApart in San Francisco

Pictures of container meeting

Numerous Hackathons held both at Google and at Partners sites

On Site Google Hackathons

– We supplied Power, Wifi, & Pizza!

Page 13: Opensocial Haifa Seminar - 2008.04.08

13

OpenSocial in India

Pictures of hackerthon

Hacking in Delhi

Pictures of container meeting

Did a multi-city tour in Fall 07 - introducing OpenSocial

Kicking off Hackathon in Bangalore

– OpenSocial Container Provider Meeting

Page 14: Opensocial Haifa Seminar - 2008.04.08

14

Who’s working on OpenSocial?

Over 200 other influential companies…

amiandoAnimotoAppirioBeboBleacher ReportBonstioNetBrad AndersonBunchball, IncBuyFastCardinal Blue SoftwareChakpakChronus CorporationCi&T Inccome2play

CurrentTVE-junkieEngage.comeTwine Holdings, Inc.Fendoo LtdFlixsterFotoFlexerFriendsterGrimmthethingGuerreiro ConsultHedgeStop.comHi5

Hungry MachineHyvesIG.com (Division of Brasil Telecom)iFamily, InciLikeImeemIndeed.comKlickSports, Inc.LabPixies Ltd.LimitNoneLinkedInLjmSite

LoveMyGadgetsLuvGoogleGadgetsMesa Dynamics, LLCMixiMuseStorm IncMySpaceNetvibesNewsGatorNikeNingNY TimesShelfari

O Globo OnlineOberon MediaOracleOrkutOutside.InPayPalPlaxoPROTRADEPuxaQloudRockYouSalesforce.com …

Page 15: Opensocial Haifa Seminar - 2008.04.08

15

OpenSocial is not just for friends

• There is an untapped Enterprise potential • Instead of friends just sharing photos, messages business partners can interact via social networks

• Google is now partnering with many influential business application providers

Page 16: Opensocial Haifa Seminar - 2008.04.08

16

OpenSocial Roadmap

• Version 0.5 was released in a “developer release” on Nov 1st.

• First “sandbox” was made available on Orkut

• Version 0.6 was released in December

• Initial version of Shindig server software was launched as Apache incubator project• Other sandboxes came live - Hi5, Ning, Plaxo …

• Version 0.7 (production) was released in January• MySpace, Hi5, Orkut officially launching “very soon”

Page 17: Opensocial Haifa Seminar - 2008.04.08

17

Gartner Technology Hype Cycle

Page 18: Opensocial Haifa Seminar - 2008.04.08

18

Open Social Hype Cycle

Page 19: Opensocial Haifa Seminar - 2008.04.08

19

Current status on (a few) containers

hi5 - launched developer platform recently (80 million users): http://www.hi5networks.com/developer/

MySpace - Developer Platform live and beta Apps Gallery available: http://developer.myspace.com

orkut – Sandbox available, launch in test phase, apps available to a subset of users (Estonia) - rolling out further in the coming weeks

ning, plaxa – sandboxes available

Page 20: Opensocial Haifa Seminar - 2008.04.08

20

Agenda

• What is OpenSocial and Why is it important?

• A Technical Overview of OpenSocial• JavaScript APIs• Container Software - Shindig• REST APIs

• Where to find more information on OpenSocial

Page 21: Opensocial Haifa Seminar - 2008.04.08

21

OpenSocial APIs overview

• People and Friends Data API Access friends information programmatically • Activities Data API See what you’re friends are up to Share what you are doing

• Persistence Data APIServer is optionalShare data with your friends, the world

The core OpenSocial services include:

Page 22: Opensocial Haifa Seminar - 2008.04.08

22

OpenSocial APIs overview

Built on industry standards

• XML • Javascript / HTML

• REST – XML/HTTP, Gdata, JSON, - tbd.

Page 23: Opensocial Haifa Seminar - 2008.04.08

23

Core Services - People & 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);};

Getting info on you and your friends:

Page 24: Opensocial Haifa Seminar - 2008.04.08

24

Core Services - People

/*** Callback function for returned friend data.*/

function onLoadFriends(response) { var viewer = response.get('viewer').getData(); var html = 'Friends of ' + viewer.getDisplayName() + ‘:<br><ul>’; var viewerFriends = response.get('viewerFriends').getData(); viewerFriends.each(function(person) { html += '<li>' + person.getDisplayName() + '</li>';}); html += '</ul>'; document.getElementById('message').innerHTML = html;};

Getting info on you and your friends:

Page 25: Opensocial Haifa Seminar - 2008.04.08

25

Core Services - Activities

/*** Posting a simple text activity*/

function postActivity(text) { var params = {}; params[opensocial.Activity.Field.TITLE] = text; var activity = opensocial.newActivity(params); opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority.HIGH, callback);}

postActivity("This is a sample activity, created at " + new Date().toString());

Posting an Activity:

Page 26: Opensocial Haifa Seminar - 2008.04.08

26

Core Services - Persistence

/*** Storing data*/function populateMyAppData() { var req = opensocial.newDataRequest(); var data1 = Math.random() * 5; var data2 = Math.random() * 100;

req.add(req.newUpdatePersonAppDataRequest("VIEWER", "AppField1", data1)); req.add(req.newUpdatePersonAppDataRequest("VIEWER", "AppField2", data2)); req.send(requestMyData);};

Requesting to persist data:

Page 27: Opensocial Haifa Seminar - 2008.04.08

27

Core Services - Persistence

/** * Fetching data*/function requestMyData() { var req = opensocial.newDataRequest(); var fields = ["AppField1", "AppField2"]; req.add(req.newFetchPersonRequest( opensocial.DataRequest.PersonId.VIEWER), "viewer"); req.add(req.newFetchPersonAppDataRequest("VIEWER", fields), "viewer_data"); req.send(handleReturnedData);}

Requesting to persist data:

Page 28: Opensocial Haifa Seminar - 2008.04.08

28

Core Services - Persistence

/*** Displaying persisted data*/function handleReturnedData(data) { var mydata = data.get("viewer_data"); var viewer = data.get("viewer"); me = viewer.getData(); // me is global var var data = mydata[me.getId()];

htmlout += "AppField1: " + data["AppField1"] + "<br/>"; htmlout += "AppField2: " + data["AppField2"] + "<br/>"; var div = document.getElementById('content_div'); div.innerHTML = htmlout;}

Displaying the fetched (persisted) data:

Page 29: Opensocial Haifa Seminar - 2008.04.08

29

0.7 Highlights

Production ready!

• Viral growth requestShareApp(), requestSendMessage()

• Feature support querying supportsField()

• Standardized person fields location, affiliations, status, profile pictures, DOB, etc.

• Gadget specs re-namespaced ie. gadgets.IE_Adjust_Frame_Height

• Better environment support methods to determine locale

• Built in JSON support

Page 30: Opensocial Haifa Seminar - 2008.04.08

30

Demonstration

• Building some simple OpenSocial apps in Orkut• Displaying your friends• Give gifts to your friends• Show what you've given• Show what you've received

• Reviewing other OpenSocial applications

Page 31: Opensocial Haifa Seminar - 2008.04.08

31

Agenda

• What is OpenSocial and Why is it important?

• A Technical Overview of OpenSocial• JavaScript APIs• Container Software - Shindig• REST APIs

• Where to find more information on OpenSocial

Page 32: Opensocial Haifa Seminar - 2008.04.08

32

OpenSocial’s Container - Shindig

• What is Shindig?• “OpenSource software that allows you to serve OpenSocial

applications”

• Is currently an Apache Software Incubator project• Heavy partner involvement: Ning championed• Open source reference implementation of OpenSocial & Gadgets technologies

• It’s Goal: “To serve as an easy to use OpenSocial “container in a box”

Page 33: Opensocial Haifa Seminar - 2008.04.08

33

Shindig Components

ShindigShindig

Gadget ServerGadget Server

Gadget Container Gadget Container JavaScriptJavaScript

OpenSocial Container JavaScript

Gadget Rendering ServletGadget Rendering Servlet

• Gadget Server• Renders gadget XML (i.e. from gmodules.com)• Gadget Container JavaScript

• OpenSocial Container JavaScript

• JavaScript environment for people, activities, persistence

Page 34: Opensocial Haifa Seminar - 2008.04.08

34

Shindig in Action

Gadget XML SourceGadget XML Source

Running the application Request is made from Client Data is returned and rendered

Application Installation Gadget XML is loaded and cached on OpenSocial Container

Page 35: Opensocial Haifa Seminar - 2008.04.08

35

Agenda

• What is OpenSocial and Why is it important?

• A Technical Overview of OpenSocial• JavaScript APIs• Container Software - Shindig• REST APIs

• Where to find more information on OpenSocial

Page 36: Opensocial Haifa Seminar - 2008.04.08

36

OpenSocial’s REST APIs

• Why are REST APIs needed?• “What if you don’t have a JavaScript environment?”

• Progress is now being made on the specification for OpenSocial REST APIs!

• A new proposal is been published• Posted in “opensocial-and-gadgets-spec” Google Group

• Currently receiving feedback

Page 37: Opensocial Haifa Seminar - 2008.04.08

37

With REST APIs OpenSocial can go Mobile!

• The OpenSocial Mobile environment potential is obviously huge • Since OpenSocial based on common Web standards programming is straightforward

• HTML/JavaScript• Flash/Flash Lite • REST APIs (Upcoming)

Page 38: Opensocial Haifa Seminar - 2008.04.08

38

Agenda

• What is OpenSocial and Why is it important?

• A Technical Overview of OpenSocial• JavaScript APIs• Container Software - Shindig• REST APIs

• Where to find more information on OpenSocial

Page 39: Opensocial Haifa Seminar - 2008.04.08

39

opensocial.org

Start getting involved early!

A non-profit entity jointly proposed by Yahoo!, MySpace, and Google

Now available to developers and website owners

• Latest specifications

• Opportunity to participate in specs discussions (REST API)

• Links to other resources

Page 40: Opensocial Haifa Seminar - 2008.04.08

40

Where to find more info on OpenSocial

http://www.opensocial.org

Specificationhttp://code.google.com/apis/opensocial/http://code.google.com/opensocialhttp://code.google.com/p/opensocial-resources

Sandboxeshttp://developer.myspace.com/http://www.hi5networks.com/developer/http://opensocial.ning.com/http://pulse.plaxo.com/pulse/gadgets/http://code.google.com/apis/orkut/

For container developershttp://opensocialapis.blogspot.com/2007/12/lets-get-this-shindig-started.htmlhttp://incubator.apache.org/shindig/http://code.google.com/p/google-caja

Page 41: Opensocial Haifa Seminar - 2008.04.08

41

Where to find more info on OpenSocial

This slide deck:

slideshare.net/arileicht

Page 42: Opensocial Haifa Seminar - 2008.04.08

42

Questions?