blug2012 yellow and blue stream

37
Yellow and Blue stream Frank van der Linden Make use of the Activity Stream, oAuth and XPages in your Social Business applications.

Upload: frank-van-der-linden

Post on 14-May-2015

552 views

Category:

Technology


2 download

DESCRIPTION

Make use of the Activity Stream, oAuth and XPages in your Social Business applications.

TRANSCRIPT

Page 1: Blug2012 yellow and blue stream

Yellow and Blue stream

Frank van der Linden

Make use of the Activity Stream, oAuth and XPages in your Social Business

applications.

Page 2: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 3: Blug2012 yellow and blue stream

Frank van der Linden

I live in Utrecht in the Netherlands.

My role is XPages/Domino/Web

developer at e-office since 2000. So I

started with Lotus Notes 4.5.x.

I develop XPages application since the

introduction of XPages in Lotus Notes

8.5.0.

In my spare time I do a lot of running and

then I mean a lot.

Page 4: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 5: Blug2012 yellow and blue stream

Blue

structure & process

process | control | predictable

manage | low costs | mechanical

9 to 5 | no errors | internal focus

no change | control | process leading

Page 6: Blug2012 yellow and blue stream

Yellow

smart & flexible

knowledge | information | everywhere

network | creativity | goal oriented

intrinsically | independent | trust

collaborate | discipline | facilitate

Page 7: Blug2012 yellow and blue stream

Yellow and Blue

Adaptive organization

Flexible, able to change directions

Also predictable

We have build a system to bring both

worlds together.

Page 8: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 9: Blug2012 yellow and blue stream

What is oAuth?

oAuth (Open Authorization) is an open standard for

authorization

It allows users to share their resources stored on one

site with another site without having to hand out their

credentials

oAuth allows users to hand out tokens instead of

credentials to their data hosted by a given service

provider. Source: http://en.wikipedia.org/wiki/OAuth

Page 10: Blug2012 yellow and blue stream

oAuth, the 3 leg dance

Page 11: Blug2012 yellow and blue stream

oAuth in the real world

Page 12: Blug2012 yellow and blue stream

OpenSocial

Public specification that defines a component

hosting environment (container)

Based on HTML and JavaScript, as well as

the Google gadgets framework

OpenSocial adopted support for Activity

Streams format

OpenSocial API and oAuth supportSource:http://en.wikipedia.org/wiki/OpenSocial

Page 13: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 14: Blug2012 yellow and blue stream

Activity Stream

It is part of the Social Business Toolkit

It is the stream of all information

API’s to connect to the stream

It will be part of IBM Connections Next and

Lotus Notes Social Edition.

oAuth authentication.

Support of OpenSocial gadget specification.

Page 15: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 16: Blug2012 yellow and blue stream

Yellow and Blue system

Get information fromIBM Connections

IBM Lotus Domino

Google

Social Business Toolkit

Page 17: Blug2012 yellow and blue stream

Yellow and Blue systemTooling used

XPages

oAuth

Social enabler from OpenNTF

Java and managed beans

HTML5

Page 18: Blug2012 yellow and blue stream

Flow diagram

Page 19: Blug2012 yellow and blue stream

Demo

Page 20: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 21: Blug2012 yellow and blue stream

Connect to the Activity Stream

If you don’t have an account for Greenhouse, go get it

(https://greenhouse.lotus.com)

Page 22: Blug2012 yellow and blue stream

Connect to the Activity Stream

oAuth is used, so you need to register your app.(

https://greenhouse.lotus.com/vulcan/security/provider/

appList?serviceProvider=vulcanToolkit

)

Page 23: Blug2012 yellow and blue stream

Connect to the Activity StreamGet the Extension Library of OpenNTF, the 8.5.3 code stream

Install the Extension Library on Designer and Domino server

Deploy the Social Enabler database to your Domino server

Deploy the WebSecurityStore database to the root of your

Domino server

And sign both databases with the correct ID.

Page 24: Blug2012 yellow and blue stream

Connect to the Activity Stream

The start point is KeysApplications.xsp in the

WebSecurityStore database

Page 25: Blug2012 yellow and blue stream

Connect to the Activity Stream

Create an Application Token

Fill in the oAuth keys and the endpoints

Page 26: Blug2012 yellow and blue stream

Connect to the Activity Stream

In the Domino Designer go to

the Package Explorer

Go to the faces-config.xml

Page 27: Blug2012 yellow and blue stream

Connect to the Activity Stream

NSFStore managed bean is used for the location of

the WebSecurityStore database

It will be used by other Managed beans to store oAuth

data.

Page 28: Blug2012 yellow and blue stream

Connect to the Activity Stream

greenHouse managed bean is used to specify the

oAuthEndpoint, and were to store.

AppId is the id, who is used as Application name in the

SBT application registration page

Page 29: Blug2012 yellow and blue stream

Connect to the Activity Stream

Use the ActivityStreamData object as datasource

The service URL: vulcan/shindig/rest/activitystreams

Endpoint: greenHouse, as stated in the Faces-config.xml

Give the datasource a variable name, so you can connect to it in your

ViewPanel

Specify in your ViewPanel as value the variable name of the datasource

And give the ViewPanel also a variable name

Page 30: Blug2012 yellow and blue stream

Connect to the Activity Stream

Activity Stream JSON - use full propertiesTitle: entry.title

Posted date: new java.util.Date(parseInt(entry.postedTime)

ID: entry.id

Image: entry.actor.image.url

Body: entry.body

JSON of the links to the source: entry.standardLinks.alternate[0].inline

Page 31: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 32: Blug2012 yellow and blue stream

XPages and Java

One managed bean controls everything

Page 33: Blug2012 yellow and blue stream

XPages and Java

It delegate the tasks to other Java classes

Page 34: Blug2012 yellow and blue stream

XPages and Java

An event handler triggered a generic Java

method via the managed bean

Results will be stored in a Java Object

Partial refresh of a panel gets the information

Page 35: Blug2012 yellow and blue stream

Agenda

Introduction

Yellow and Blue

oAuth and OpenSocial

Activity Stream

Yellow and Blue System

Connect to the Activity Stream

Under the hood

Q&A

Page 36: Blug2012 yellow and blue stream

Q&A

Page 37: Blug2012 yellow and blue stream

How to reach me

Twitter:@flinden68

Blog: http://www.domino-weblog.nl

E-mail: [email protected]