The developerWorks article, "Taking a tour of the new features and technology in IBM Lotus Sametime 7.5" introduced you to Lotus Sametime V7.5’s new capabilities and user interface, but it only briefly touched on the possibility of extending the product’s functionality. This article picks up where that one left off by introducing the types of enhancements developers can bring to their user community using the IBM Lotus Sametime Connect Software Development Kit (SDK).
One of the key values of Lotus Sametime Connect V7.5 is the ability for third-party developers to use Eclipse-based plug-ins to extend the product’s functionality. Lotus Sametime Connect V7.5 includes an SDK that documents the APIs needed for extending the client, using the Eclipse rich client application plug-in development model. The "Lotus Sametime Connect Integration Guide" that is included with the SDK explains the implementation of several sample plug-ins, which can serve as starting points for creating more complex plug-ins. Developers can examine and modify the source code of these plug-ins, using a basic Integrated Development Environment (IDE) like Eclipse or a more sophisticated IDE, such as IBM Rational Application Developer.
NOTE: Past development experience, especially with Eclipse, is helpful but not essential to appreciating the topics presented in this article. The next article in this series explains the programming steps necessary to extend Lotus Sametime Connect and is intended for programmers with Eclipse plug-in development experience.
This article introduces you to the new Lotus Sametime architecture, provides you with a high level overview of application development in Lotus Sametime V7.5, and describes the sample plug-ins that ship with Lotus Sametime Connect V7.5.
Out with the old, in with the new
IBM Lotus Sametime Connect V7.5 is a market-leading product and platform for real-time collaboration. Lotus Sametime provides presence awareness, instant messaging, and Web conferencing features that enable people to collaborate in real time, regardless of their physical location. Release 7.5 includes many new features, such as:
- A dramatically enhanced user interface
- New presence features, for example, location awareness, In A Meeting status, and selective Do Not Disturb status
- Extended platform support for Macintosh and Linux users
- Third-party extensions using the standard Eclipse plug-in framework
The Lotus Sametime V3.1 user interface (UI) and the Lotus Sametime V7.5 UI are shown in figures 1 and 2, respectively.
Figure 1. Lotus Sametime V3.1 UI
Figure 2. Lotus Sametime V7.5 UI
As you can see, there are obvious differences, but the most dramatic change to Lotus Sametime V7.5 is its move from being a product to a platform. Plug-ins, created by IBM or by third parties, can extend the functionality of Lotus Sametime Connect using its SDK.
Why extend Lotus Sametime Connect?
An extensible client is more flexible than traditional applications. For example, instead of distributing quarterly upgrades, you can provide plug-ins that users can install themselves. In addition, your company may begin by using Lotus Sametime’s out-of-the-box click-to-voice-chat function. At some future point, however, you can integrate Lotus Sametime with your company’s internal PBX phone system for click-to-call functionality, using a plug-in that you develop or purchase from a third-party vendor.
Previous releases of the Lotus Sametime instant messaging client did not allow for extensions. Release 7.0 of the Lotus Sametime Java Toolkit allowed for reuse of Sametime-aware widgets and gave API access to server data, but today’s Lotus Sametime Connect goes further.
In addition, and perhaps most importantly, the instant messaging and presence components in Lotus Sametime Connect V7.5 can be used by other IBM managed client products, including the next release of IBM Lotus Notes, code-named Hannover, and future releases of the IBM Workplace Managed Client.
In creating the Lotus Sametime Connect SDK, IBM considered more than 30 possible scenarios that would demonstrate extending the product before narrowing the list down to five samples. It was IBM's intent that the source code from the SDK samples would be useful starting points for your own projects and also be practical enough to be worth installing for everyday use.
Extending the Lotus Sametime Connect UI
Figures 3 and 4 show more formally where additional plug-ins can display their contributed UI elements in the main window. The scope of these UI changes can be large or small.
In the Tools menu, you can create an action menu item that opens a related application (see figure 3). Or you can add a new choice on a Contact’s context menu that brings up his employee information for the selected member of the Contacts list. Because plug-ins tap directly into the base code, it is difficult to distinguish features that ship with the product from features that are enabled by third-party plug-ins, unless these features are deliberately called out.
Figure 3. Example of extensible UI elements
Figure 4 shows a chat UI that has several plug-in enhancements, such as an icon to launch conversations through voice chat, using Voice Over Internet Protocol (VoIP). Your own extensions can contribute to the Action bar, Tools menu, and Message toolbar.
Figure 4. Chat UI with plug-in enhancements
These two samples give you an idea of what can be accomplished in your extensions to Lotus Sametime Connect.
Overview of the Lotus Sametime Connect architecture
The Eclipse Rich Client Platform (RCP) and IBM WebSphere Everyplace Deployment serve as the foundation of Lotus Sametime Connect. A key benefit of this choice of platform is that it can integrate seamlessly with other application components namely other plug-ins. The contributions of these plug-ins can be as simple as a new menu choice that displays information in a dialog box or as complex as a wholly integrated mini-application. The overarching goal of the Lotus Sametime Connect architecture is to provide three benefits: extensibility, integration, and reuse.
The benefit of using Eclipse as an integration platform to the user is its ability to add new functionality into the environment. A flexible yet consistent user experience is a strong selling point, but the advantage for Eclipse programmers is the leveraging of their existing skills in developing standard Eclipse RCP line-of-business applications. Those who are new to Eclipse will find the Eclipse and developerWorks Web sites bursting with helpful articles. Books on Eclipse application development, such as The Java Developer's Guide to Eclipse, are also readily available.
Most of the principles of Eclipse application development are directly applicable to creating extensions to Lotus Sametime Connect. Even users without previous Eclipse application development experience will recognize in these principles the common object-oriented programming patterns. For example, Eclipse follows the classic separation of model (Workbench) and view (ViewParts and their lower-level graphical components in the JFace framework). Thus, the clear separation of component responsibility reduces the need to learn each individual piece to be productive. The Lotus Sametime architecture embraces this same principle.
Figure 5 shows major Lotus Sametime Connect components. The Java runtime, Eclipse RCP, and WebSphere Everyplace Deployment layers form the foundation common to IBM's managed client products, which include the Lotus Notes Hannover release and future releases of the IBM Workplace Managed Client. The components enclosed by the box are specific to Lotus Sametime Connect and include public and implementation-specific plug-ins.
Figure 5. Major components of Lotus Sametime Connect
Most of the rectangles in the row above the Eclipse 3.2 RCP layer correspond to one or more plug-ins. Some, like the Lotus Sametime Java API, represent libraries that may be referred to by plug-ins above them, but they aren't plug-ins themselves. That is, not all code is plug-in aware either because it pre-dated the Eclipse plug-in model or because it does not require the extensibility that Eclipse provides.
Lotus Sametime Connect SDK sample plug-ins
Let's now discuss the samples that come with the Lotus Sametime Connect SDK.
Many chats begin with "Hi" and finish with a short list of common responses such as, "Thanks, I’ll talk to you later." Other times, the conversation is temporarily suspended with formulaic responses such as, "Sorry, I’m in a meeting right now. Can I ping you later?" or "Let’s talk about it. Please call me at 555-1212." Some instant messaging users handle these cases with abbreviated responses like BRB (be right back) or OTP (on the phone) under the assumption that the partner knows the shorthand lingo. The Quick Response plug-in handles this common scenario more deftly by enabling the user to define full-sentence pre-scripted responses.
It’s not difficult to envision that this same approach can be extended to other situations, such as handling common responses for online chat Help Desks. For example, a customer service representative could return a text response and reference Web page links to common questions with a couple of clicks. Because Lotus Sametime Connect supports rich text responses, the representative could also include HTML with graphics if his partner’s instant messaging client is similarly equipped.
In summary, the Quick Response plug-in provides the user with a one-click button for inserting pre-typed responses. For the programmer, Quick Response demonstrates:
- Integrating new capabilities with the chat window
- Modifying the UI by adding an icon to the action bar and adding drop-down menu choices
- Contributing preferences pages to Lotus Sametime Connect’s common preferences dialog box
Figure 6 shows an example of the Quick Response plug-in contribution to the chat window.
Figure 6. Example of Quick Response plug-in
The standard Lotus Sametime Connect Contacts list organizes partners in groups, which works well for managing a large number of contacts, but we often chat with a much smaller circle of people whose members change over time. Recent Buddies works differently from the Contacts list in that its content is determined dynamically based on your recent chats. Initiating a chat with someone from your Contacts list or receiving an incoming chat from someone who may or may not be in your Contacts list automatically adds them to the Recent Buddies list. After a partner is added to this list, you can promote her to Primary partner (as indicated by an asterisk next to her name), and the entry sorts to the top. Alternatively, you can exclude a dynamically added partner from appearing in the list.
In summary, the Recent Buddies plug-in provides users with a dynamic list of contacts based on their most recent chats. For the programmer, the plug-in demonstrates how to:
- React to important events within the Lotus Sametime Connect client (for example, incoming and outgoing chats)
- Retrieve user information from the Sametime directory
- Store user-specific data locally, in this case the list of users with whom you've recently chatted
Figure 7 shows an example of the Recent Buddies plug-in below the standard Contacts list. The person’s context pop-up menu presents the same choices as it does elsewhere in the product, plus three Recent Buddies-specific choices at the bottom. Thanks to the seamless integration with the base user interface, the user cannot distinguish between the newly introduced capabilities of the Recent Buddies plug-in and those that come with the stock configuration.
Figure 7. Example of Recent Buddies plug-in
The SDK includes other easy-to-understand examples that demonstrate how to use the Lotus Sametime Connect APIs.
This sample defines a mini-application that resides in the Contacts list, similar to Recent Buddies. In this case, the composite application contains a business card and text area for your notes. As you select partners in the Contacts list, BuddyNote is updated to show their business card information and any notes you previously entered about them. In terms of implementation difficulty, this example is slightly more complex than your typical "hello world" sample.
This sample automatically converts incoming acronyms, such as LOL and BRB, to their full text phrase, that is, laughing out loud and be right back. The source code could be easily adapted to handle other sorts of transformations, such as language translation, company-specific acronyms for inventory codes, and so on.
Snippets is a grab bag of source code examples, for instance, short examples that add menu items to different views and objects, that extend the n-way chat participants list, and so on.
The samples are intentionally self-contained; they do not require services beyond those provided by the Lotus Sametime server. However, because Lotus Sametime Connect is built on IBM WebSphere Everyplace Deployment, your own extensions can take advantage of enterprise access to data.
IBM partners actively participated in the Lotus Sametime Beta program, and you can expect to see many new integrated capabilities now that Lotus Sametime Connect V7.5 is generally available!
IBM Lotus Sametime has evolved from an instant messaging application to being a fully extensible development environment. Plug-ins, such as Quick Response and Recent Buddies, can extend the functionality of Lotus Sametime Connect using its SDK. The Eclipse Rich Client Platform serves as the foundation of Lotus Sametime Connect, enabling the user to add new functionality into the environment.
Be sure to look for more articles that steps you through the process of building and deploying a Lotus Sametime Connect V7.5 plug-in from start to finish.
Learn
-
developerWorks article, "Getting started with the Eclipse platform "
-
developerWorks Lotus article, "Taking a tour of the new features and technology in IBM Lotus Sametime 7.5"
-
developerWorks Lotus article, "Extending IBM Lotus Sametime Connect V7.5 with an SMS messaging plug-in"
-
developerWorks Lotus article, "Designing a Google Maps plug-in for IBM Lotus Sametime Connect V7.5"
-
developerWorks Lotus article, "Extending the Lotus Sametime client with an LDAP directory lookup plug-in"
-
IBM Lotus Sametime 7.5 product page
Get products and technologies
-
Download the Lotus Sametime Software Development Kit (SDK) from developerWorks Lotus.
-
Register for the Lotus Sametime 7.5 demo.
Discuss
- Participate in the discussion forum.
-
Participate in developerWorks blogs and get involved in the developerWorks community.
Dan Kehn is a Senior Software Engineer at IBM in Research Triangle Park, NC. He has a broad range of software experience, having worked on development tools, such as Rational Application Developer, and on operating system performance, memory analysis, and user interface design. He is also co-author of the award-winning book, The Java Developer's Guide to Eclipse. Currently, he is a Technical Enablement Specialist helping business partners integrate their products into IBM Lotus Sametime Connect.




