creating opensocial apps

33
Creating OpenSocial Gadgets Bastian Hofmann Mittwoch, 10. Februar 2010

Upload: bastian-hofmann

Post on 24-May-2015

1.000 views

Category:

Technology


0 download

DESCRIPTION

Presentation at Berlin GTUG on creating OpenSocial Apps

TRANSCRIPT

Page 1: Creating OpenSocial Apps

Creating OpenSocial GadgetsBastian Hofmann

Mittwoch, 10. Februar 2010

Page 2: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

2

Agenda

Part 1: Theory What is a Gadget? What is OpenSocial? Privacy at VZ-Netzwerke OpenSocial Services OpenSocial without Gadgets - The Rest API

Part 2: Practical Let‘s write our own Gadget

Mittwoch, 10. Februar 2010

Page 3: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What is a Gadget?

XML file with HTML and JavaScript (and CSS, Images, Flash, ...)

Application based on the Google Gadgets specification

Can be included on various platforms, which support this specification

3

Mittwoch, 10. Februar 2010

Page 4: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

How to include gadgets?

The Gadget Server renders the Gadget XML provides the JavaScript API provides the REST (or RPC) API

Rendered result is included through an <iframe> into the parent page (Container)

4

Mittwoch, 10. Februar 2010

Page 5: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

Gadget Features

Gadget specification includes a rich JavaScript API with a multitude of features preferences views dynamic-height flash io ...

Extendabel

5

Mittwoch, 10. Februar 2010

Page 6: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

One Gadget - Different Views

Profile Canvas Preview Group Popup Integration

6

Mittwoch, 10. Februar 2010

Page 7: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

And what is OpenSocial?

Extension of the Gadget JavaScript API

an open standard

enables gadgets to access the social graph of users

7

Mittwoch, 10. Februar 2010

Page 8: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

The OpenStack

8

Mittwoch, 10. Februar 2010

Page 9: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

Viewer != Owner or Viewer == Owner and Friends

9

Mittwoch, 10. Februar 2010

Page 10: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What about privacy? Example of our solution.

Visibility Visibility on a user‘s profile page can be changed individually for

friends or other people.

Access Access to user data is handled through a special vcard

Communication Gadget needs user permissions for communication (Messages, Activity

Stream, Notifications, ...)

10

Mittwoch, 10. Februar 2010

Page 11: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

VCards

Wile installing a gadget, the user has to assign an existing or new vcard to it

Data on vcard can differ to the user‘s profile

Gadget has only access to data of users which have installed the gadget

11

Mittwoch, 10. Februar 2010

Page 12: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

12

Services

Mittwoch, 10. Februar 2010

Page 13: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

People Service

Access to social graph(Users and their friends)

At VZ: all vcards of users who have installed the gadget accessable

At VZ: not writable

API offers sorting and filtering abilities

Identification with special OpenSocial ID: www.studivz.net:K0UCbAZQeQsyHC467mx3Cw

13

Mittwoch, 10. Februar 2010

Page 14: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

AppData Service

Persistent Key - Value Store

stored by gadget

In practice most gadgets store data in their own backend

14

Mittwoch, 10. Februar 2010

Page 15: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

... and even more services

numerous additional services are specified by the OpenSocial standard or by extensions implemented in one or more big containers:

Activities Messages Payment Photos

15

Mittwoch, 10. Februar 2010

Page 16: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

Server to Server - The OpenSocial REST API

All JavaScript OpenSocial APIs are available in the REST (and RPC) API as well

Access with Two-legged OAuth (in the context of a gadget) or Three-legged OAuth with Consumer Key and Secret

16

Mittwoch, 10. Februar 2010

Page 17: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

And now the fun part ...

Let‘s write our own gadget in six steps:

Hello World, Metadata and Views Static Content and CDN Access It‘s getting social: People Service Be safe while saving: AppData Service A bit more complex: Accessing your own backend with OAuth Spread it: Viral proliferation with invites

17

Mittwoch, 10. Februar 2010

Page 18: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

18

DEMO

Mittwoch, 10. Februar 2010

Page 19: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

19

Mittwoch, 10. Februar 2010

Page 20: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9

20

Mittwoch, 10. Februar 2010

Page 21: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service

21

Mittwoch, 10. Februar 2010

Page 22: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service

22

Mittwoch, 10. Februar 2010

Page 23: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service Photos Service

23

Mittwoch, 10. Februar 2010

Page 24: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service Photos Service Payment API

24

Mittwoch, 10. Februar 2010

Page 25: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service Photos Service Payment API Advertising API

25

Mittwoch, 10. Februar 2010

Page 26: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service Photos Service Payment API Advertising API Sandbox improvements

26

Mittwoch, 10. Februar 2010

Page 27: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service Photos Service Payment API Advertising API Sandbox improvements OpenSocial REST API in Sandbox

27

Mittwoch, 10. Februar 2010

Page 28: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

What‘s on the roadmap 2010?

OpenSocial 0.9 Activity Service Messages Service Photos Service Payment API Advertising API Sandbox improvements OpenSocial REST API in Sandbox OpenID

28

Mittwoch, 10. Februar 2010

Page 29: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

29

Mittwoch, 10. Februar 2010

Page 30: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

30

Mittwoch, 10. Februar 2010

Page 31: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

And at VZ-Netzwerke?

31

Launch Dec. 2009

5.37 Million Installations

250.000 Unique Users at Canvas Views

43 Apps in Gallery, ca. 90 Apps live

16.1 Million Users

Mittwoch, 10. Februar 2010

Page 32: Creating OpenSocial Apps

VZnet Netzwerke Ltd. l studiVZ.net l schuelerVZ.net l meinVZ.net

Further information ...

http://www.opensocial.org

Our blog: http://developer.studivz.net

Our wiki: http://developer.studivz.net/wiki

Become a developer and get access to our sandbox:http://www.studivz.net/Developer and http://www.meinvz.net/Developer

Or implement an OpenSocial container yourself:http://incubator.apache.org/shindig/

32

Mittwoch, 10. Februar 2010

Page 33: Creating OpenSocial Apps

Thank you!

Contact:

Bastian Hofmann

[email protected]

http://www.studivz.net/bastian

Mittwoch, 10. Februar 2010