IBM Lotusphere 2012 AD205 - IBM Sametime® in IBM Connections®, IBM WebSphere® Portal®, and more

37
© 2012 IBM Corporation AD205 IBM Sametime® in IBM Connections®, IBM WebSphere® Portal®, and more William Holmes | Software Engineer | IBM

Transcript of IBM Lotusphere 2012 AD205 - IBM Sametime® in IBM Connections®, IBM WebSphere® Portal®, and more

© 2012 IBM Corporation

AD205 IBM Sametime® in IBM Connections®, IBM WebSphere® Portal®, and more

William Holmes | Software Engineer | IBM

2 | © 2012 IBM Corporation

IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion.

Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision.

The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.

3 | © 2012 IBM Corporation

Agenda■ Introduction

■ Products Integration

■ Application Integration

■ Summary

4 | © 2012 IBM Corporation

Sametime & Application integration■ Sametime integration happens at the client side

─ Server (Portal/Connections/iNotes/etc.) simply delivers the client code

■ There are currently 3 mechanisms for Sametime Web integration─ STLinks

– Java applet solution

– Old, with old-fashioned UI

─ Sametime WebConnect API

– Requires Sametime Connect client

– Uses http server embedded in rich client

─ Sametime Proxy server

– Uses intermediate server to connect to Community Server

– DHTML zero-footprint solution

– Can also transparently be configured to use the WebConnect API

5 | © 2012 IBM Corporation

Sametime Proxy architecture

SametimeCommunity

Server

SametimeCommunity

Server

Sametime Proxy Server

ProxyServletREST APIs

Response in JSON

RTCServlet/rtc4web

Synchronous HTTPRequest/Response• Login/Logout

AsynchronousRequest/Responsevia long poll, i.e.,requests held at httpq channel queue until data are available or timeout• Status Update• Chat Messages, etc

polling

Response in JSON

httpq channel

VP

Event listener

Presence Service

Chat Service

SametimeCommunity

Server

SametimeCommunity

Server

Sametime Proxy Server

ProxyServletREST APIs

Response in JSON

RTCServlet/rtc4web

Synchronous HTTPRequest/Response• Login/Logout

AsynchronousRequest/Responsevia long poll, i.e.,requests held at httpq channel queue until data are available or timeout• Status Update• Chat Messages, etc

polling

Response in JSON

httpq channelhttpq channel

VP

Event listener

Presence Service

Chat Service

6 | © 2012 IBM Corporation

Sametime Proxy API Overview■ There are three levels of API

─ REST API

─ Base components, along with Livename and Chat models

─ UI Components

7 | © 2012 IBM Corporation

Sametime Proxy REST API Layer■ Complex

─ Difficult to integrate into a web application without creating new framework

─ Probably more suited to native app development rather than web

■ Requires two threads─ One to manage the application

─ One to manage the long poll

■ Documentation─ See Chapter 6 and Appendix A of SDK documentation

─ See also Chapter 3 for long poll responses

8 | © 2012 IBM Corporation

Sametime Proxy Base Components & Models Layer■ JavaScript encapsulation of REST API

─ Exposes the full range of Sametime functions

─ Presence awareness easy to manage

– Can be complicated to implement a UI for other functions

─ Does not require use of any UI framework

– No default UI provided – you have to write your own

■ Simplifies access to Sametime Proxy functions─ Hides complexity of cross-domain requests, long-poll management and response processing

─ Models simplify access to common/complex functions

■ Documentation─ See Chapter 3 of SDK documentation

─ Livename Model – pp 45-46 of SDK documentation

─ Chat Model – pp 46-51 of SDK documentation

9 | © 2012 IBM Corporation

Sametime Proxy UI Components Layer■ Wraps Base Components, based on Dojo Toolkit v1.5.1

■ Flexible and extensible─ Broad range of widgets

– Full web client, Buddylist, LiveName, Awareness, QuickFind, Chat, Group Chat, UserInfo, Business Card

─ All widgets are programmable and extensible and skinnable

─ Declarative + programmatical dynamic creation of widgets

■ Documentation─ See Chapters 4 & 5 of SDK documentation

10 | © 2012 IBM Corporation

Agenda■ Introduction

■ Products Integration

■ Application Integration

■ Summary

11 | © 2012 IBM Corporation

Enabling Sametime in the products■ IBM Webshere Portal■ IBM Connections■ Lotus iNotes and Domino Web Access

12 | © 2012 IBM Corporation

General integration requirements■ Ensure the product versions match■ Configure the web page as required■ Include the Sametime CSS file■ Include JavaScript

─ Include Dojo Toolkit, if the hosting application does not already do so

─ Include Base Components JavaScript

─ Include UI Components JavaScript

─ Include any product-specific JavaScript

■ Add code for your solution

13 | © 2012 IBM Corporation

Enabling Sametime in Websphere Portal server 7.0.0■ Update Sametime Proxy Server 8.5.1.x with fix #WHOS-8MAJ6R■

■ Edit <PortalRoot>/PortalServer/config/config/CSEnvironment.properties─ Set CS_SERVER_SAMETIME.enable=true

─ Change (or add) the CS_SERVER_SAMETIME_1.xxx properties, where xxx is

– .protocol - set to http or https

– .hostname – set to Sametime Proxy server's hostname

– .port – set to Proxy server port, e.g. 9080

– .useLTPAToken – set to true

– .dnAuthorSeparator – set to /

– .watchnameformat – set to dn

– .dnNameSeparator – set to / if Sametime uses Domino LDAP

– .nameFormatForResolve – set to dn if Sametime uses Domino LDAP and Portal uses a different directory service

■ Restart the Portal Server─

■ See Portal Wiki - http://bit.ly/ygJyYV

14 | © 2012 IBM Corporation

Integrating Sametime into portlets■ Easiest to include in the theme

─ Already included in PageBuilder theme

─ Alternatively, follow instructions for basic enabling (see later ...)

– Add configuration lines

– Add CSS

– Add JavaScript, including portal-specific

• http://<ProxyServer>:<Port>/stwebclient/latest/apps/websphereportal.js

─ As an example, the Sametime Contacts portlet assumes the PB theme which includes these

■ Each portlet contains only the code that is necessary─ No need to repeat basic enabling code

─ Check if Sametime is enabled and user is logged in

─ If including declarative code, use dojo.parse

■ Note that livenames automatically turn into Portal person cards─ Hover for business card message

15 | © 2012 IBM Corporation

IBM Industry Templates for WebSphere Portal■ Templates for : Insurance, Retail, Banking, Government, Healthcare

─ See http://bit.ly/xCNPVk

■ Provide starting points for sophisticated applications in these areas─ End-user help provided by Sametime IM

16 | © 2012 IBM Corporation

Enabling Sametime in IBM Connections 3.0.1■ Update Sametime Proxy Server v8.5.1.x with the same fix #WHOS-8MAJ6R■

■ Described in the Connections Wiki - http://bit.ly/zIHHWS─ Edit the Common Configuration properties for sametimeProxy.xxx:

– .enabled - Specifies whether to connect to the Sametime Proxy server

– .href - URL of the Sametime Proxy server, e.g. http://www.foo.com:9080

– .ssl.enabled - Specifies if SSL is enabled on the Sametime Proxy

– .ssl.href - Secure URL for the Sametime Proxy, e.g. https://www.foo.com:9443

■ Described in the Connections Wiki - http://bit.ly/ksl2BU─ Configure Edge server

─ Configure Reverse Proxy server

─ Configure the lconnProxySvcUrl and lconnProxySvcUrlSSL values

■ Restart the Connections Server

17 | © 2012 IBM Corporation

Enabling Sametime in future IBM Connections■ This is the current expectation – not final yet!!

■ Configure SSO between Connections and Sametime.─ Export the LTPA token from your Connections deployment

– See the Sametime Wiki: http://bit.ly/ymfWTr

─ Import the token to ST Community Server

– See the Sametime Wiki: http://bit.ly/wJ1CpG

■ Instead of describing the Edge server, specify the Sametime Proxy server─ In uiextensions-config.xml, change the lc.ImAwareness extension entry:

─<extension name="global.pageRendering" jsCallback="lconn.profiles.sametime.sametimeProxyInit" enabled="true" /><extension name="lc.IMAwareness" jsCallback="lconn.profiles.sametime.sametimeProxyAddLiveName" invokeDelay="2000" enabled="true" id="stProxy"> <params> <param name="isConnectClient" value="true" /> <param name="lconnProxySvcUrl" value="http://<ProxyServer>:9080"/> <param name="lconnProxySvcUrlSSL" value="https://<ProxyServer>:9443"/> </params>

18 | © 2012 IBM Corporation

Enabling Sametime in future IBM Connections■ Make sure that WebConnect API connections are not enabled

─ By default sametimeAwareness is disabled - confirm these settings:

─– <sametimeAwareness enabled="false" href="http://localhost:59449/stwebapi/"

– ssl_href="http://localhost:59449/stwebapi/"

– sametimeInputType="uid" />

■ Synchronize the Node and restart Connections

19 | © 2012 IBM Corporation

Integrating Sametime into Connections customizations■ Select the JSP as usual, e.g. footer.jsp■

■ Add only the code that is necessary─ No need to repeat basic enabling code

─ Check if Sametime is enabled and user is logged in

─ If including declarative code, use dojo.parse (see later)

■ Add the widgets & functions you require

20 | © 2012 IBM Corporation

Enabling Sametime in Lotus iNotes 8.5.3■ Previous versions only had tech preview support■ Requires Sametime Proxy 8.5.2 IFR1■ Configuration described in Lotus Notes and Domino Wiki

─ Update Configuration Doc and Policies, as described in http://bit.ly/riJkoa

21 | © 2012 IBM Corporation

Integrating Sametime into Lotus iNotes 8.5.3■ Customization described in the Lotus Notes and Domino Wiki

─ See Lotus iNotes Customization: http://bit.ly/yNNWCB

■ Select the appropriate database item in the NSF■

■ Add only the code that is necessary─ No need to repeat basic enabling code

─ Check if Sametime is enabled and user is logged in

─ If including declarative code, use dojo.parse (see later)

■ Add the widgets & functions you require■

22 | © 2012 IBM Corporation

Agenda■ Introduction

■ Products Integration

■ Application Integration

■ Summary

23 | © 2012 IBM Corporation

Sametime basic integration – configuration■ Set up configuration flags

─ var stproxyConfig = {

– server: "http://<ProxyServer>:<Port>",

– tunnelURI: "http://<ApplicationServer>/path/tunnel.html",

• // Tunnel only used from 8.5.2 onwards

– isConnectClient: false // Or true to allow use of WebConnect API

─ };

─ var djConfig {

– isDebug: true, // Optional debugging flag

– parseOnLoad: false // Portal + Connections use false

─ }

■ Include stylesheet─ http://<ProxyServer>:<Port>/stwebclient/latest/dojo.blue/sametime/

themes/WebClientAll.css

24 | © 2012 IBM Corporation

Sametime basic integration – JavaScript files■ Include base components JavaScript

─ http://<ProxyServer>:<Port>/stbaseapi/latest/baseComps.js

■ Include UI components JavaScript─ If Dojo is not already loaded

– http://<ProxyServer>:<Port>/stwebclient/latest/widgets.js

─ If Dojo is already loaded– http://<ProxyServer>:<Port>/stwebclient/latest/widgetsLight.js

■ If you only need livenames─ Load livename.js instead of widgets.js if loading dojo.js yourself

─ Load livenameLight.js instead of widgetsLight.js if dojo.js is already loaded

■ Using /latest/ forces a redirect to ensure latest version of JS is loaded

25 | © 2012 IBM Corporation

UI Components – Declaratively creating widgets■ Each widget can be instantiated declaratively

─ <span dojoType=”sametime.<WidgetName>” <param>=”value”></span>

■ This requires that the widgets be parsed by Dojo─ Turns them into real Sametime UI Widgets

─ Use a style class to make them easier to find on the page

...<span dojoType=”sametime.LiveName” userId=”heather.reeds” class="FindMe"></span>...<span dojoType=”sametime.LiveName” userId=”joe.soap” class="FindMe"></span>...<span dojoType=”sametime.LiveName” userId=”jane.doe” class="FindMe"></span>...

<script type="JavaScript"> stproxy.addOnLoad( function() { dojo.query(".FindMe").forEach(function(node, index, arr) { dojo.parser.parse(node); }) ; });</script>

26 | © 2012 IBM Corporation

UI Components – Programatically Creating widgets■ Each widget can be instantiated programatically:

─ var widget = new sametime.<WidgetName>(args[, domNode]);

─ where args has the format

– { “arg1”: “value1”, “arg2”: “value2” …}

─ and the optional domNode can be

– Omitted or null, although the created widget's DOM node can be used, e.g.

• dojo.byId(“myElement”).appendChild(widget.domNode)

– The ID (string) of an existing DOM node

– An expression that returns a DOM node

• dojo.byId(“elemID”)

• dojo.doc.createElement(“div”)

■ Often easier than using declarative mechanism─ Have to use JavaScript to parse the nodes anyway

27 | © 2012 IBM Corporation

General recommendations■ Since Sametime may not be enabled, code should check for:

─ Is Sametime loaded?

─ Is the user logged in?

– if (stproxy && stproxy.isLoggedIn) {

• Add your code here– }

28 | © 2012 IBM Corporation

Logging in■ You can log into Sametime if not already logged in

─ Typically integration means that SSO is already enabled, so use loginByToken

// Error callback - generic functionfunction generalErrorHandler(reason, error) { alert("Error: " + reason + ": " + error);}

function loggedout() { alert("OK, I have successfully logged out");}

function loggedInOK() { alert("I have successfully logged in"); // Log the user out immediately stproxy.login.logout(true, loggedout, generalErrorHandler);}

// When stproxy is ready, log inIf (stproxy) { stproxy.addOnLoad( function(){ stproxy.login.loginByToken(userID, stproxy.awareness.AVAILABLE, "I'm available", loggedInOK, generalErrorHandler); });}

29 | © 2012 IBM Corporation

Adding widgets – the livename■ Often you want special behaviors associated with the livename

─ Connections uses its own person card (vcard)

– Presence usually only requires the status icon

• var widget = new sametime.LiveName({“userId”:”heather.reeds”,

• “disableRightClick”: true},

• dojo.byId(“myLiveNameNode”));

─ Portal also uses its own person card

– Creating a livename automatically turns it into a portal vcard

30 | © 2012 IBM Corporation

Adding widgets - Awareness■ Another useful widget

─ Used to set the current user's presence status

─ Typically this item is popped up as required, and then hidden after use

var aware = new sametime.Awareness({},dojo.byId("myAware"));dojo.connect(aware, "onSet", handleComplete);dojo.connect(aware, "onCancel", handleComplete);

31 | © 2012 IBM Corporation

Demo

Sametime integration

32 | © 2012 IBM Corporation

Agenda■ Introduction

■ Products Integration

■ Application Integration

■ Summary

33 | © 2012 IBM Corporation

Summary■ UI Components based on Dojo

─ Can leverage Dojo extensibility

■ Sametime Proxy functions can be integrated into any application─ Techniques are very similar for all applications and products

─ Much of the work is already done for you

– Integrated into some Portal themes

– Integrated into Connections and iNotes

■ Simple─ If your app is complex, you're doing it wrong

─ Usage is simple – the difficult stuff is managed for you

■ Flexible and extensible─ All UI Components are programmable and extensible and skinnable

34 | © 2012 IBM Corporation

Any questions?

?

35 | © 2012 IBM Corporation

Other sessions■ SHOW301 – Leveraging the Sametime Proxy to support Mobile users and Web

applications ─ Monday 04:30 PM – 06:15 PM

■ AD206 – The upcoming IBM Sametime Meetings Server Remote Client SDK─ Wednesday 03:00 PM – 04:00 PM

■ BP209 – Doctors have scalpels, carpenters have hammers, IBM Sametime Developers have SDKs

─ Thursday 08:30 AM – 09:30 AM

■ BOF122 – IBM Sametime Web Integration

36 | © 2012 IBM Corporation

William HolmesSoftware Engineer

Unified Communications and Collaboration

IBM International HoldingsDublin Technology CampusDamastown Industrial ParkMulhuddart, Dublin 15, Ireland

[email protected]

37 | © 2012 IBM Corporation

Legal disclaimer© IBM Corporation 2012. All Rights Reserved.

The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

BM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both.

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.