Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

... means something different to Domino developers than it does to the general populace.

I've been having a look at the Replication Conflict Management tool on, and it looks like a nice tool for administrators and database owners. There is one problem I see, though, and that's that there's no side-by-side comparison of the documents themselves. If you want end users to resolve their own replication conflicts (they being the ones who know best what's supposed to be in the documents), it would help to be able to scroll them together, edit one of them, and copy-paste information from one to the other, as well as having the display of which fields are different to help them find the changes. The problem with a text-only compare, is that not all content is necessarily text.

side-by-side main and conflict docFor an internal application, I've been working on a tool to do this. I've got it set up as a separate database. I can select or open a replication conflict document in any database, click a toolbar button, and I've got this nice UI that lets me browse the differences and edit one (or both). The bottom of the screen shows a list of the different fields and their values. You can scroll them separately using their scroll bars, but there are action buttons at the top that let you scroll the two sides by the same amount, making it simple to visually search for differences such as a picture being in one but not the other...

external diff toolOne of the action buttons, labelled "diff", exports both documents into text files and launches an external tool (you can configure the launch command line). I use WinMerge, which is open-source and free.

There are also action buttons to choose one document as the "winner" (perhaps after editing). This would flag the other one for soft-deletion, or take another action as appropriate to the application in which they appear -- for instance, users don't have access to delete documents, so we set a field to flag it for an agent. This depends on embedding the conflict resolution screen into the application so that there's a place to write the application-specific coding, rather than the current implementation of a separate local database.

All this is useful, but there are a couple of things I'd like to improve. The list of field differences just displays the different values, and I'd like to highlight which words are different. I know there are lots of algorithms for doing this efficiently, but I didn't find one already in VB/LotusScript, and I don't have time to translate one at the moment. If someone already has such a script, I'd appreciate a pointer or copy.

Second, the buttons to scroll the sides together use an OS-dependent implementation of SendKey, which at the moment is only implemented for Windows. I published this library years back as part of Domino Design Library Examples, and have always meant to figure out an implementation for Mac (and now, Linux). Is there anyone out there familiar with the equivalent OS functions for these platforms? (Or, even better, does anyone have an idea how to implement the together-scrolling without using SendKey?

Once I get it working the way I like, I will of course post it in the Sandbox or on

Andre Guirard | 31 July 2007 08:09:07 AM ET | Plymouth, MN, USA | Comments (13)

Search this blog 


    About IBM Privacy Contact