How to get started with plugin development

I get a lot of questions (via e-mail and IM) on how to get started with plugin development for the Lotus Notes platform. Instead of answering them all individually I thought I would (finally) write a general purpose blog post to try and answer these questions in general terms.

First of I’m sorry to say that the current state of affairs for someone who want to get started doing plugin development for the Lotus Notes platform is grim. There is as you might have experienced very little material available for programmers new to the Eclipse world to build stuff for Lotus Notes 8+ clients. To make things worse the material that is available often cut corners or simply start out too advanced. That being said I am hearing muffled voices mention some material being developed and that IBM Lotus is focusing on this matter but it will be yet some time before it’s out. Until that time and until we can upload information directly into the brain like martial arts skills are given to Nemo in The Matrix I suggest the following.

My suggestions for someone getting started would be to start by realizing that programming for Eclipse and hence in SWT for the Lotus Notes 8 client has nothing, what so ever, to do with traditional Notes programming. It sounds obvious but once you have accepted this it gets easier. Maybe not easier technically but easier to accept that this is a completely new field you’re venturing into. If nothing else you stop looking to IBM Lotus for help and instead turn to the Eclipse side of the internet.

Before you start to whine I think this is just fine and how it should be. Really. Initially most of the stuff you need to know to get started has nothing to do with IBM Lotus but is general purpose Eclipse development information. It’s like blaming Toyota for not telling you how to repair their cars. Toyota can be expected to tell you and document what’s so special about their cars. They can’t be expected to teach you the basics – you go to a car repair classes for that.

It’s the same with Eclipse development. Learn the basics and specialize from there. You could say that we could expect information about the various ways to extend the client to readily available and better documented. I’ll give you that… 🙂

Once you’re past that and before you embark on your journey first realize this. In Eclipse and SWT we build everything our selves and we’re left to the mercy of the client and the differences that exist across the different platforms (Notes 8.0.x vs. Notes 8.5 across Mac / Linux / Windows XP / Windows Vista / Windows 7). We’re close to the metal with all the benefits, worries and problems that entail.

So if I had to come up with an action plan for learning about Eclipse / Expeditor / Notes 8+ development it would be something like the following:

  • Learn Java! Become proficient in Java! It sounds obvious but it’s one of the pillars for being successful in this area. Pay special attention to the following areas as they are used heavily when developing for Eclipse:
    • Event publishing/subscription using listeners
    • Anonymous inner classes
    • Interfaces
    • Multithreading
  • Learn about GUI development in general. Resources for developing in Java SWING are just as good as those for SWT as many, if not all, of the concepts apply to both. UI development includes:
    • Widgets
    • Layout managers
    • Threading and the concept on an UI thread. What should and shouldn’t you do on the UI thread!?
  • Learn about Eclipse and the Eclipse platform for building RCP (Rich Client Platform) programs.
  • Buy a book about it such as “Java Developer’s Guide to Eclipse, The (2nd Edition)“. It has been a good help to me.
  • Stop by http://www.eclipse.org/articles and take a look at the articles there.
  • Follow this blog 🙂

As you can see it’s no small adventure you’re starting into. The learning curve may be steep but it’s also rewarding to be able to extend the client beyond belief. If only you’d started learning Java earlier…

SSL certificates and the WAS plugin

Had some issues yesterday morning with the SSL certificate used between the WAS IHS plugin and WAS for a Lotus Connections installation (Dannotes in case you were wondering why you couldn’t log in this morning). Again it turned out to be the all to well known “ERROR: lib_stream: openStream: Failed in r_gsk_secure_soc_init: GSK_ERROR_BAD_CERT(gsk rc = 414)” issue where the SSL certificate from WAS isn’t trusted by the IHS WAS plugin.

The issue were “easily” solved by help of Technote 1264477 (GSK_ERROR_BAD_CERT error configuring SSL between Plug-in and Application Server V6.1). The solution is of course to extract the certificate from WAS and import it into the IHS WAS plugin keystore.

Configured the LinkedIn iWidget for Lotus Connections

Based on a blog post by Luis Benitez I configured the Linkedin iWidget for Lotus Connections yesterday. So if you’re a Dannotes Lotus Connections user you can now configure your profile page to show your Linkedin data as well (my profile).

The widget works by showing LinkedIn data alongside the profile page if the profile owner chooses to. Each user has to authorize the LinkedIn API to show the data. If he/she doesn’t it simply shows a message to that effect.

The documentation on how to install the iWidget leaves something to be desired but I managed and have it working now. I’m still IM’ing with a fellow yellow bleeder who is also trying to do the install. For him however it’s not working and we cannot seem to figure out why. My best guess is that the widget cannot figure out that he’s on his own profile but we’re not sure yet. Maybe it simply worked for me because I also did it on my MyDeveloperWorks page.

Complete guide to manually uninstalling “plugins” from Lotus Notes

As you probably know installing and uninstalling Java extensions (“plugins”) into the Lotus Notes client is easy using either File >> Application >> Install, File >> Application >> Application Management or the widget catalog. Sometimes however this doesn’t work and you’ll have to resort to a manual uninstall. This blog post outlines the way to perform a manual uninstall.

We have to start with some basics though. A Java extension in Lotus Notes (also known as a “plugin”) consists of two things:

  1. Eclipse plugin(s)
    The plugin is where the actual code and functionality is stored together with additional resources such as images, string translation etc.
  2. Eclipse feature
    The feature is what’s actually installed from a Lotus Notes perspective. The feature points to the Eclipse plugins that provides the actual functionality. It’s almso important to note that a single feature may reference multiple plugins.

Both an Eclipse plugin and an Eclipse feature are represented in the file system as JAR-files (files with an extension of “JAR”) and both of them are kept in the file system. A JAR-file is just a fancy ZIP-file with a predefined folder structure. Eclipse Features and plugins are stored in two directories beneath your Notes data directory (<Notes data dir.>/workspace/applications/eclipse/features for the features and <Notes data dir.>/workspace/applications/eclipse/plugins for the plugins).

From the above it may seem obvious that simply deleting these files will uninstall a Java extension – unfortunately there’s a final piece to the puzzle. Lotus Notes also keeps a record of what’s installed in a file called platform.xml (stored in <Notes data dir>workspace.configorg.eclipse.update). Simply deleting the feature(s) and plugin(s) may seem to work but will misbehave for instance when activating the File >> Application >> Application Management interface. The solution is to edit this file as well.

The complete steps to manually uninstalling a Java extension is therefore as follows:

  1. Close Lotus Notes
  2. Open the “features”-directory (<Notes data dir>workspaceapplicationseclipsefeatures)
  3. Locate the Eclipse features to uninstall.
  4. For each Eclipse feature you need to open it and edit the feature.xml file. Locate the <plugin>-tags and fine the names of the referenced plugins. Note that there might be more than one. Combining the plugin id and the plugin version will give the full filename of the plugin (<plugin id>_<plugin version>.jar).
  5. Delete the Eclipse features you’re uninstalling.
  6. Open the “plugins”-directory (<Notes data dir>workspaceapplicationseclipseplugins).
  7. Delete the plugin JAR-file(s) you recorded in the step above.
  8. Open the directory containing the platform.xml file (<Notes data dir>workspace.configorg.eclipse.update).
  9. Edit platform.xml and go to the end of the file.
  10. Remove each entry you see for the features you deleted in the step above.
  11. Save and close the file.
  12. Since Lotus Notes also keeps a record of which Java extensions to load it’s best to start Notes with some parameters to make it recompute the Java extension registry: notes.exe -RPARAMS -clean

Let me know if the above doesn’t work for you.

Please note: Manually uninstalling a Java extension installed via a widget descriptor via a widget catalog/policy will probably just make it reinstall once uninstalled.

Project Agora Next – imagine this for Lotusphere 2011

I’m currently commuting doing some late catchup on what happened at Lotusphere. Among other things I was lucky to have Stephan tell me to go and check out Project Agora Next in the Innovation Lab (Agora: Next Generation Meetings). This is very cool technology.

Agora: Next Generation Meetings
Agora is a collaborative media service with the primary goal of surfacing information buried in monolith meeting recordings by making it accessible from a collaborative point of view, as well as from an information mining aspect. This web-based solution enables users to upload recorded meeting video and/or audio, automatically create transcriptions and attach metadata such as micro tags and comments. Tags and comments are identified along the meeting timeline highlighting items and segments of interest. The metadata can be edited and improved upon through collaboration. Metadata is used to facilitate searching for segments of interest, as well as collaboration and discussion.

So what does it actully do? Well imagine that you missed a web meeting and/or wanted to see what happened in the meeting. Instead of having to sit through the entire recording the system has transcribed the audio, indexed the transcription and slides for searching AND made a note when something of interesting happened. So what’s “something of interest” you may ask. Well that’s a slide changing, new speaking appearing, a question being asked etc. With all this info you can jump directly to the interesting sections instead of having to sift through it all. Way cool. Oh! And the system also automatically updates your calendar so that when you search your calendar for that meeting you cannot quite remember, you’ll see the thumbnails and links to interesting spots right there in your very own calendar. It just got even more cool.

Besides being available in the Innovation Labs at Lotusphere Agora is also available now in LotusLive Labs (probably requires login to LotusLive but has some cool recorded samples) so you may check it out there as well.

Imagine stuff like Agora for all Lotusphere sessions coupled with a persistent Lotusphere Online community. How cool would that be. Persistent access to all sessions, transcribed for easy searching with a community aspect of tagging cool demos and the like. Wicked!!

Changing the way I approach selling the value of social software

Yesterday I spoke at Lotusphere Comes To You in Copenhagen (and will be again tomorrow in Århus) on Lotus Connections and how companies should consider implementing Lotus Connections. As part of the discussions we have been having at the office in preparation for these talks I realized that my take on social software has changed significantly. I have spent a great deal of time the last year(s) evangelizing, installing and talking about Lotus Connections but I never really took the time to stop and think about whether I was doing it the right way.

While preparing for the talks I realized that the discussion has changed from a “isn’t this cool technology” and “you got to have this to be forward thinking” discussion to a “how can you live without it” and “you need this to be current” discussion. And I think that’s where the ball dropped. You need this kind of technology to be current. Not forward thinking. Current.

From the discussions I’m having it still seems like many people think of social software as something related to their private lives. Social software is Facebook – it’s not something for use on the job – at the office we use e-mail. For some reason many consider it an either/or and that the two doesn’t complement one another. It’s also becoming clear that many are so used to using specific applications that the concept of having multiple interfaces for the same data/functionality and that social capabilities may surface in many locations is foreign to them.

Another interesting thing I realized is that I need to stop talking about Lotus Connections as a product but instead talk about social software services. If we start discussing Lotus Connections as a product we quickly get into a technology discussion which it really isn’t. We need to discuss the need for social capabilities. The customer may obtain these social services from other sources than Lotus Connections – they may come from LotusLive. I see this as an interesting way to approach the problem of getting social software into business.

Lotus Traveler calendar invites on iPhone caveat

Just after we had our main Domino servers in the office upgraded to 8.5.1 FP1 I looked into doing to Lotus Traveler configuration updates required to be able to process calendar invites on the iPhone. I did the changes, restarted Lotus Traveler but were unable to see invites on my phone. I messed a little around with it but with no success. Today however I heard other iPhone-enabled colleagues mention that they processed invites on their iPhones. WTF!!

Tonight it hit me why. I have been using the Notices mini-view in my Inbox to show calendar invites for easy processing. Having invites show up in the mini-view apparently blocks the invites from reaching my iPhone because after disabling the use of the mini-view in the mail preferences and sending an invite from my private e-mail/calendar system the invite appeared right away on my iPhone. So there it is – problem solved.

Automatically redirect iPhone users to the mobile UI of Lotus Connections

If you’re running Lotus Connections 2.5 and you installed the mobile interface you really should redirect your mobile users to this interface and not have them remember the URL to the mobile interface. By default users need to specify http://<hostname>/mobile to access the mobile interface (see bleedyellow.com/mobile if you want to see what it looks like) which is not what you want. You want it to happen automatically. To accomplish this simply use mod_rewrite to automatically redirect the user based on the User-Agent of the accessing browser (much like setting the default feature).

To add a mod_rewrite rule to automatically redirect iPhone users add the following to your httpd.conf and restart IHS. Doing the same for Nokia S60 users should be equally easy if you know the User-Agent for those phones.

RewriteCond %{HTTP_USER_AGENT} "^Mozilla/[0-9].[0-9] (iPhone.*"
RewriteRule  ^/?$ /mobile [R,L]

Easy isn’t it?

Remember Lotusphere Comes To You next week in Copenhagen and Århus

If you missed Lotusphere 2010 then do remember that Lotusphere Comes To You next week in Copenhagen and Århus. Among others I’ll be no stage at both events to talk about Lotus Connections and how you may get started easily whether that be with an on-premise solution (Lotus Connections) or a hosted solution (LotusLive Engage/LotusLive Connections). You may sign up for LCTY 2010 here.