reaching a new level of collaboration with sametime 7.5
TRANSCRIPT
© 2006 Wellesley Information Services. All rights reserved.
Reaching a New Level of Collaboration With Sametime 7.5
Rob NovakSNAPPS
2
What We’ll Cover …
• Introducing Sametime 7.5 Connect Client• Extending the Connect Client• Understanding Sametime Architecture, Eclipse,
and WED• Exploring the Sample Plug-ins• Definitive Resources
3
Sametime Connect 7.5 = Redesigned Real-Time Collaboration
Instant Messaging Presence Awareness Instant Web Conferencing
Extensibility
All welcome features, however the focus of this presentation will be …
4
Sametime Connect 7.5 – New Look and Feel
Before After
5
• There are literally pages of new improvements, such as chat history
Sametime Connect 7.5 – Many New Features
6
Sametime Connect 7.5 – Many New Features (cont.)
• Voice chat for up to five participants
• Telephony integration available from 3rd party providers
7
Unified Instant Messaging and Extensibility
• Sametime Connect 7.5 is the first release of the new unified instant messaging (UIM) client
• All managed client products use the sameEclipse-based WebSphere Everyplace Deployment (WED) platform
• UIM is a set of common instant messaging andpresence client components for IBM managedclient products, including Hannover and Workplace Managed Client (WMC)
8
Extensible Client Based on Eclipse
• Integrating contributions from various plug-ins is Eclipse’s raison-d’être
• Partner program includes more than 40 participants delivering solutions
• IBM and third-party plug-ins extend Sametime Connect with VoIP, Location Awareness, LDAP, etc.
9
What We’ll Cover …
• Introducing Sametime 7.5 Connect Client• Extending the Connect Client• Understanding Sametime Architecture, Eclipse,
and WED• Exploring the Sample Plug-ins• Definitive Resources
10
How to Extend Sametime Connect 7.5
• Sametime Connect 7.5 is built on Eclipse• SDK’s Integration Guide includes practical end-user
extensions to demonstrate how the product can be enhanced by third parties using plug-ins
• Extensions allow seamless integration into the Sametime Connect 7.5 client user interface
11
Adding UI Extensions (Main Window)
12
Adding UI Extensions (Chat Window)
13
Sametime Connect 7.5 Demonstration
Demo
Sametime Connect 7.5
14
What We’ll Cover …
• Introducing Sametime 7.5 Connect Client• Extending the Connect Client• Understanding Sametime Architecture, Eclipse,
and WED• Exploring the Sample Plug-ins• Definitive Resources
15
What Is Eclipse and WED?
• Sametime Connect Client is composed of Eclipseplug-ins
• Wait … isn’t Eclipse an IDE?Yes, but it is also a rich client application development platformArchitected with extensibility as one of the primary objectivesPlug-ins are the base functional unit (declarations + code)Plug-ins define “extension points” where other plug-ins can contribute (e.g., menu items, services)
• Plug-ins can define extension points to allow otherplug-ins to extend their functionality
Sametime plug-in extension points are documentedin the Sametime Connect Client Toolkit
16
What Is Eclipse and WED? (cont.)
• Extend the Sametime Client by creating your own plug-ins that leverage the Sametime plug-in extension points
Your plug-ins can access any services exposed by Sametime and the underlying platforms (RTC API, Sametime Java API, WED, Eclipse, Java RTE)Your plug-ins register listeners for events that they need to handleYour plug-ins can define extension points for other plug-ins to use
• See www.eclipse.org for more information• WebSphere EveryPlace Deployment builds
upon Eclipse to deliver an enterprise-ready rich client application platform
17
Sametime 7.5 Client Architecture (Eclipse Base)
Eclipse 3.2 RCP
Platform Runtime
SWT JFace PerspectivesHelpWorkbench
Sametime Platform
Sametime Platform
18
UIM Client Architecture
Java Runtime Environment (J9 JCL Desktop for Sametime Connect 7.5)
Eclipse 3.2 RCP
Credential Store/SSO
Pre-Authenticated Browser
Embedded Browser
Network Sensing Localization Spell Checker User Interface
Components ...
WED 6.1 (WebSphere Everyplace Deployment)
MessagingServices
RTSession
Buddy List Storage Directory Privacy Policy
SIP Stack * Third-Party Protocols * Sametime Java Toolkit
Community Services Chat Storage Telephony User Info
User Interface Components
Login Chat Presence Real-Time Sessions Notification Other
Tools
RTC (Real-Time Collaboration) API
OS-Specific Services
Quick Find
Storage Service
Service and Plug-in
Registry
Location Service
Policy Service
* SIP and third-party protocols not supported in Sametime 7.5
Capabilities
19
What We’ll Cover …
• Introducing Sametime 7.5 Connect Client• Extending the Connect Client• Understanding Sametime Architecture, Eclipse,
and WED• Exploring the Sample Plug-ins• Definitive Resources
20
Sample Plug-ins
• Acronym Expander
• Branding
• Snippets
• Quick Response
• Recent Buddies
• Buddy Note
21
Quick Response Plug-in
• What it does for the user: Provides one-click button to answer common questions
• What it demonstrates for the programmer:Chat window integration using pop-up add-onAdding chat toolbar action
22
Quick Response UI
Clicking this button or…
Opens the Quick Response pop-up add on*
Opens the Quick Response menu pulldown
* Same pop-up add on is used to show peer-to-peer file send status(tabs appear if there is more than one pop-up add on needed)
Clicking this drop-down
23
•Manifest-Version: 1.0•Bundle-ManifestVersion: 2•Bundle-Name: Quick Response Plug-in•Bundle-SymbolicName: com.ibm.collaboration.realtime.sample. quickresponse;singleton:=true
•Bundle-Version: 1.0.2•Bundle-Activator: com.ibm.collaboration.realtime.sample. quickresponse.QuickResponsePlugin
•Bundle-Vendor: IBM•Bundle-Localization: plugin•Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,com.ibm.collaboration.realtime.imhub,com.ibm.collaboration.realtime.chatwindow,com.ibm.collaboration.realtime.ui,com.ibm.collaboration.realtime.messages,com.ibm.collaboration.realtime.magiccarpet
•Eclipse-LazyStart: true
Quick Response Manifest – Required Plug-ins
• The Quick Response manifest file
Required Eclipse plug-ins
Required Sametime 7.5 plug-ins
24
Quick Response Plug-in Extension Classes
Plug-in Purpose QrPopupAddOn • Introduces UI element
• Gives list of responses and listens for what choice was selected
QrOpenPopupAddOnAction • Adds the action to the existing general actions in the toolbar as a drop-down menu
QuickResponsePreferencePage • Preference page for adding, removing, and editing quick responses.
25
Quick Response Plug-in Extension Manifest
• Quick Response plugin.xmlDeclares two Sametime-specific extension points
com.ibm.collaboration.realtime.chatwindow.popupAddOncom.ibm.collaboration.realtime.chatwindow.chatAction
<extensionpoint="com.ibm.collaboration.realtime.chatwindow.popupAddOn">
<popupAddOnclass=“…sample.quickresponse.QrPopupAddOn"id=“…sample.quickresponse"name="Quick Response"/>
</extension>
Defines appearance and behavior of the contributed pop up add-on
26
Quick Response Plug-in Extension Manifest (cont.)
• The following lines of code show the plugin.xml file:…<extension
point="com.ibm.collaboration.realtime.chatwindow.chatAction"><chatAction
class=“…sample.quickresponse.QrOpenPopupAddOnAction"displayName="Quick Response"id=“…realtime.sample.quickresponse.openquickresponse"image="images/quickresponse.png"path="format/end"showsFor="both"tooltipText="Quick Response"type="format"/>
</extension>
Defines “run”behavior of the
contributed action
27
QrPopupAddon Composite
Your extension can request the handler add
text to the transcript, return participants, etc.
• The following code creates the pop-upadd on:
public class QrPopupAddOn implements PopupAddOn {
private ChatWindowHandler wndHandler = null;List listResponses;
public QrPopupAddOn() {super();
}
void addItems() {ArrayList elems = QuickResponsePlugin.getDefault().loadResponses();for (int i = 0; i < elems.size(); i++)
listResponses.add((String) elems.get(i));listResponses.add(QuickResponsePlugin.ADD_NEW_RESPONSE_MSG);
}
public Composite createControl(ChatWindowHandler handler, Composite parent) {wndHandler = handler;Composite comp = new Composite(parent, SWT.NONE);comp.setLayout(new FillLayout());
listResponses = new List(comp, SWT.SINGLE …);addItems();listResponses.addSelectionListener(...);...
return comp;}
public int getInitialSize() {return PREFERRED_HEIGHT;
}}
PopupAddon:
public interface PopupAddOn {public Composite createControl
(ChatWindowHandler, Composite);public int getInitialSize();
}
28
QrOpenPopupAddOn Action• The following code adds content to the
pop-up window:
public class QrOpenPopupAddOnAction extends ChatWindowAction {private boolean isPopupShowing = false;
public QrOpenPopupAddOnAction() {super(IAction.AS_DROP_DOWN_MENU);
}
public void run() {ChatWindowHandler handler = getChatWindowHandler();
if (isPopupShowing) {handler.closePopup(QuickResponsePlugin.POPUP_ADDON_ID);
} else {handler.createPopupMessageArea(
QuickResponsePlugin.POPUP_ADDON_ID,QrPopupAddOn.PREFERRED_HEIGHT);
}isPopupShowing = !isPopupShowing;
}
public IMenuCreator getMenuCreator() {return new IMenuCreator() {
...};
}
}
ChatActionWindowAction
public class ChatWindowAction extends Action {….
}
29
Quick Response Plug-in Manifest Outline
30
Recent Buddies Mini Application
• What it does for the user: Displays a dynamic list of users, based on most recent chats (similar to NotesBuddy’s primary buddies)List is stored locally
• What it demonstrates for the programmer:Event notificationLocal data storageDirectory interface
31
The Recent Buddies UI
Recent chat partners sorted by name, time of last chat, number of chats, or status. Optionally include photo, if
available
32
Adding a Sametime Mini Application
• In order to add a mini application, a developer needs to:Create an Eclipse plug-in that requires the Sametimeruntime plug-insDeclare a contribution to the UI with an extension toSametime specific extension pointsCreate an extension class
33
• Manifest-Version: 1.0• Bundle-ManifestVersion: 2• Bundle-Name: Sametime Sample Recent BuddiesPlug-in
• Bundle-SymbolicName: com.ibm.collaboration.realtime.sample.recentbuddies; singleton:=true
• Bundle-Version: 1.0.2• Bundle-Activator: …sample.recentbuddies.RecentBuddiesPlugin
• Bundle-Vendor: IBM• Bundle-Localization: plugin• Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,com.ibm.collaboration.realtime.core,com.ibm.collaboration.realtime.community,com.ibm.collaboration.realtime.imhub,com.ibm.collaboration.realtime.messages,com.ibm.collaboration.realtime.people,com.ibm.collaboration.realtime.storage
• Eclipse-Lazystart: true
The Recent Buddies Manifest
• The Recent Buddies MANIFEST.MF
Required Eclipse plug-ins
Required Sametime 7.5 plug-ins
34
The Recent Buddies Plug-in Extensions
Plug-in Purpose RbMiniApp • Adds the Recent Buddies view to the
miniApps area when Sametime is launched. • This class also determines what information
is displayed and how it is laid out as well as the right click actions that can be performed on members of this list.
RbMessageHandlerAdapter • Handles and processes the messages from the notification service.
Standard “person” actions + unique Recent Buddies menu
choices
35
Recent Buddies Plug-in Extension Manifest
• Recent Buddies plugin.xmlDeclares a Sametime specific extension point
com.ibm.collaboration.realtime.imhub.miniAppscom.ibm.collaboration.realtime.messages.MessageHandlerListener
• The following lines of code show the plugin.xml file:…<extension
point="com.ibm.collaboration.realtime.imhub.miniApps"><miniApp
category="shelf.messaging"class="com.ibm.collaboration.realtime.sample.recentbuddies.ui.RbMiniApp"displayName="Recent Buddies"id="com.ibm.collaboration.realtime.sample.recentbuddies.miniApp"maxHeight="400"/>
</extension>
Your “mini app” declares the class responsible for creating thecontents of the tabbed area and defines its behavior
36
Recent Buddies Plug-in Extension Manifest (cont.)
• The following lines of code show the plugin.xml file:…<extension
point="com.ibm.collaboration.realtime.messages.MessageHandlerListener"><messageHandler
class="com.ibm.collaboration.realtime.sample.recentbuddies.RbMessageHandlerAdapter"/>
</extension></plugin>
Your “message handler” can subscribe to IM events (connected,disconnected, status change) and UI events (person selected,chat window opened)
37
Recent Buddies Plug-in Outline
38
Buddy Note Plug-in
• What it does for the user: Displays a shelf text area to enter short notes about the currently selected person Notes are stored locally
• What it demonstrates for the programmer:
How to declare a “mini application” extensionHow to track the selection ofa person Mini app area with
shelves
39
Adding a Mini Application
• In order to add a mini application, a developer needs to:Create an Eclipse plug-in that requires the Sametimeruntime plug-insDeclare a contribution to the UI with an extension to Sametime-specific extension pointsCreate an extension class
40
The Buddy Note Manifest – Required Plug-ins
• The Buddy Note manifest file, MANIFEST.MF
Uses Open Sources Gateway Initiative (OSGi) bundlesDescribes how the plug-in is packagedDefines the plug-in requirements
• Manifest-Version: 1.0• Bundle-Name: BuddyNote• Bundle-SymbolicName: com.ibm.collaboration.realtime.sample. buddynote;singleton:=true
• Bundle-Version: 1.0.2• Bundle-Activator: com.ibm.collaboration.realtime.sample. buddynote.BuddyNotePlugin
• Bundle-Vendor: IBM• Bundle-Localization: plugin• Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,com.ibm.collaboration.realtime.core,com.ibm.collaboration.realtime.community,com.ibm.collaboration.realtime.imhub,com.ibm.collaboration.realtime.messages,com.ibm.collaboration.realtime.people,com.ibm.collaboration.realtime.magiccarpet,com.ibm.rcp.realtime.livenames
• Eclipse-LazyStart: true• Bundle-ManifestVersion: 2• Export-Package: com.ibm.collaboration.realtime.sample.buddynote
Required Eclipse plug-ins
Required Sametime 7.5 plug-ins
41
BuddyNote Classes
Plug-in Purpose BuddyNoteMiniApp • This class extends the AbstractMiniApp class,
which builds the tabbed application window, defines what content appears in the window, and how it will be laid out.
BuddyNoteMessageHandlerAdapter • Handles and processes the messages from the notification service.
42
The Buddy Note Plug-in Extension Manifest
• Buddy Note plugin.xml declares Sametime-specific extension points
<extensionpoint="com.ibm.collaboration.realtime.imhub.miniApps">
<miniAppcategory="shelf.messaging"class="com.ibm.collaboration.realtime.
sample.buddynote.BuddyNoteMiniApp"displayName="BuddyNote"maxHeight="300"id="com.ibm.collaboration.realtime.
sample.buddynote.buddynoteminiapp"/></extension>
<extensionpoint="com.ibm.collaboration.realtime.messages.
MessageHandlerListener"><messageHandler class="com.ibm.collaboration.realtime.
sample.buddynote. BuddyNoteMessageHandlerAdapter"/>
</extension>
Defines appearance and behavior of the
contributed mini-app
Reacts to key client events
(e.g., connected, buddy selected)
43
BuddyNoteMiniAppusing com.ibm.collaboration.realtime.imhub.miniApps extension point
• The BuddyNoteMiniApp class extendspublic class BuddyNoteMiniApp extends AbstractMiniApp {
static public BuddyNoteMiniApp INSTANCE;private final String DEFAULT_NOTE = “…";private IPerson person = null;MyBusinessCard bizCard;StyledText textControl;String currentNote = null;
public Control createControl(Composite parent) {Composite comp = new Composite(parent, SWT.BORDER);comp.setLayout(new FormLayout());
// Business card is "person aware", i.e., will update // as the person's status updates.bizCard = new MyBusinessCard(comp, SWT.NONE);FormData fd = new FormData();...bizCard.setLayoutData(fd);
// Text input area; it displays an indication that it's empty// as defined by DEFAULT_NOTEtextControl = new StyledText(comp, SWT.MULTI | SWT.V_SCROLL |
SWT.WRAP);...
// Save and restore the buddy note on gain/lose focus.// (remember not to store the "default" note!)textControl.addFocusListener(new FocusAdapter() {... });
return comp;}
• The AbstractMiniApp class
public abstract class AbstractMiniApp {
public abstract Control createControl(Composite parent);
public boolean showsInitially() {return true;}
public abstract void init() throws Exception;
}
44
• The BuddyNoteMessageHandlerclass extends
public class BuddyNoteMessageHandler extends DefaultMessageHandler {
public void handleMessage(BuddySelectedMessagemessage) {
IPeopleService peopleSvc = (IPeopleService) ServiceHub.getService(IPeopleService.SVC_TYPE);
IPerson person = peopleSvc.getPersonById(message.getPersonId());
BuddyNoteMiniApp.INSTANCE.handleBuddySelected(person);
}
public void handleMessage(ImConnectedMessagemessage) {
BuddyNoteMiniApp.INSTANCE.handleConnected();}
public void handleDefaultMessage(Message message) {}
}
• The DefaultMessageHandler class
BuddyNoteMessageHandlerusing com.ibm.collaboration.messages.MessageHandlerListener extension point
• Your handler is notified by overridingthe desired handleMessage(eventMessage) method
45
Buddy Note Plug-in Outline
46
What We’ll Cover …
• Introducing Sametime 7.5 Connect Client• Extending the Connect Client• Understanding Sametime Architecture, Eclipse,
and WED• Exploring the Sample Plug-ins• Definitive Resources
47
Critical Resource: The Sametime 7.5 Integration Guide
www.ibm.com/developerworks/lotus/downloads/toolkits.html
48
Other Resources
• Dan Kehn et al., The Java Developer’s Guide to ECLIPSE (Addison-Wesley Professional, 2004.)
• www.lotus.com/sametime• Lotus Developer Domain articles (Google maps
example)www-128.ibm.com/developerworks/lotus/library/sametime-googlemaps
• www.eclipse.org (start with a simple Eclipse sample project – no Sametime)
Note: Special thanks to Dan Kehn, Senior Software Architect at IBM and author of A Java Developer’s Guide to ECLIPSE
and the Sametime 7.5 Integration Guide for session materials and assistance with the new release
49
7 Key Points to Take Home
• Sametime 7.5 is the most significant release of Sametime ever – worth a look at new toolkits for developers even if you’ve never tried out theother toolkits
• Architecture is a preview of upcoming product directions, so learning Eclipse and Java is gettingpretty critical
• Start small by following examples of non-Sametime development in Eclipse, then dive into the SDK
• The platform is solid, the design choice is solid, butthe provisioning model for plug-ins needs work
50
7 Key Points to Take Home (cont.)
• A review of XML is key to understanding plug-in manifests (packaging)
• Some key concepts to understand: manifests, extension points, extension classes, Eclipse RCP vs. plug-ins
• In prior versions of Sametime, extensibility via Sametime bots often created demand and improved adoption. In 7.5, even with drastically enhanced out-of-the-box functionality, plug-ins will ultimately make it a development platform for presence-based applications.
51
Your Turn!
Questions?
How to Contact Me:Rob Novak
[email protected]© Copyright 2006 SNAPPS. All Rights Reserved.