Integrating IBM Lotus Domino data with Microsoft SharePoint Services
Microsoft has been taking shots at the IBM Lotus Domino product line for years. Not long ago, Microsoft Exchange Server was going to take Lotus Dominoâs place in the enterprise landscape. That prognosis fell flat, but Microsoft continues to take aim at the venerable Lotus Domino platform. Microsoft Windows SharePoint Services is Microsoftâs latest collaboration offering; it may be used standalone or combined with numerous other Microsoft products to build applications that attempt to duplicate Lotus Domino functionality.
With SharePoint entering the fray, many customers mistakenly think that they must select it or Lotus Domino; however, the platforms can peacefully coexist and work together. You can easily harness the power of both. This article examines various ways to integrate Domino-based data and applications into a SharePoint environment. It begins with a brief introduction to the SharePoint platform.
The following tools are used in this article:
- Microsoft Windows Server 2003 with SharePoint Services
- Lotus Domino V7.0.1
- IBM Lotus Domino Designer V7.0.1
What is Microsoft SharePoint?
Microsoft SharePoint is just one of several Microsoft products that are offered as Lotus Domino alternatives. However, to duplicate the many features available in Lotus Domino, you also need Microsoft Exchange, Microsoft Visual Studio .NET, and others products -- not merely SharePoint. Essentially, SharePoint is a portal server that pulls together different resources into a single Web interface. These resources may be Web sites, backend data, file system resources (such as documents), and so forth. The SharePoint product is currently available in two flavors:
- Microsoft Windows SharePoint Services
The core product provides the basic features of SharePoint and various templates for building sites. Itâs available as a standard component beginning with Windows Server 2003. Itâs based on the Microsoft .NET Framework.
- Microsoft Office SharePoint Portal Server
This server provides features for grouping and organizing individual sites and listings as well as searching across multiple sites. Windows SharePoint Services is at its core with more extensive features added.
Both versions of SharePoint use Microsoft SQL Server as their backend data store. The specific details of SharePoint are beyond the scope of this article. Instead, we focus on the ways you can integrate Domino-based data and applications into a SharePoint installation.
SharePoint and Lotus Domino integration
Recently, we received a call from a client about migrating existing Domino data to a new SharePoint installation. It was a questionable proposal, given the client's large Domino installation. We asked questions and proceeded to reveal the various ways to leverage current Domino-based applications within the new SharePoint installation.
Integration is a fact of life in today's enterprise environments, which feature multiple application platforms, so the ease with which Lotus Domino and SharePoint can work together should be no surprise. There are numerous ways to integrate the platforms; the following list provides an overview:
- The Web
SharePoint offers Web-based access to disparate resources, while Lotus Domino easily serves its data through Web requests. Therefore, you can include Domino-based data and applications in a SharePoint environment using standard HTTP requests or using Web services (in Lotus Domino 7).
XML has evolved into the de facto language for moving data. Lotus Domino includes extensive XML support through its development languages (LotusScript/Java), which may be exposed through Domino Web agents. You can also read data in a Domino view with the ?ReadViewEntries URL command.
The .NET Framework's standard way to access data sources is ADO.NET. Domino data can be treated like any data source and accessed by Open Database Connectivity (ODBC: IBM Lotus NotesSQL ODBC driver) or a Domino-specific .NET data adapter.
- Component Object Model (COM)
Although one of the goals of the .NET Framework is to obliterate COM and its problems, it can still be used within a .NET application. Lotus Domino exposes its objects through COM; they can be used to access Domino-based objects within a SharePoint environment.
A critical aspect of the SharePoint environment is Web Parts, the vehicle for bringing together different resources into one interface. A crash course in the basics of Web Parts is beneficial before diving into Lotus Domino and SharePoint integration.
Web Parts are software components for controlling portions of a Web page. They provide a method to include resources within SharePoint. The resources can range from simple Web pages to calling a Web service and displaying the results.
Web Parts are programmatically based on the .NET Framework and Microsoft ASP.NET. Basically, Web Parts are ASP.NET server controls. You can create new Web Parts as ASP.NET custom controls. However, they have one critical difference from standard ASP.NET controls, which you add to Web form pages at design time: Web Parts are intended to be added to Web Part Zones on Web Part Pages by users at runtime.
The SharePoint Web interface is divided into zones or pages. Resources are placed in these areas using Web Parts as you will see in the next section. SharePoint products and technologies rely on Web Parts to provide configurable and extensible user interfaces. This article uses standard, out-of-the-box Web Parts.
Before diving into examples of how you can use Domino resources in SharePoint, letâs take a quick look at the sample Domino application that accompanies this article. Figure 1 shows the default view for a Domino database that contains company information. The application contains one form with fields for the company name, contact name, and email address. In addition, it contains one view that displays data listed by company name.
Figure 1. Default view of the sample Domino database
Figure 2 shows one of the documents from the database.
Figure 2. Sample document opened in the Domino database
You can download the sample database from the Download section of this article to follow along.
Using the Web
The simplest way to integrate Domino-based applications in a SharePoint environment is through standard Web or HTTP calls. You can easily do this with the SharePoint Page Viewer Web Part.
You can use the Page Viewer Web Part to display a Web page, file, or folder on a Web Part Page. A hyperlink, file path, or folder name is used to link to the content. Of course, you need a SharePoint site to connect to Lotus Domino. Figure 3 shows the Create Page option selected in a SharePoint test environment.
Figure 3. Creating a new SharePoint site
You choose the Web Part Page template from the list (located at the bottom of the template list not shown in the figure). This template lets you organize the layout of a Web Part Page into zones and arrange one or more Web Parts inside these zones. In this article, you link to Domino resources in the individual zones.
A new Web Part Page is created using the template shown in figure 4.
Figure 4. Creating a new Web Part Page using an existing template
A key feature of Web Parts is their drag-and-drop nature. You can select a Web Part, drag it to the target area or zone on the page, and drop it into place. You can configure it after itâs placed in the desired zone.
As previously stated, you use the Page Viewer Web Part to access Lotus Domino using HTTP. Click the Next link to access the Page Viewer Web Part option, shown in figure 5.
Figure 5. The Page Viewer Web Part option
Drag and drop the Page Viewer Web Part to the desired location. Figure 6 shows it placed in the lower portion of the page.
Figure 6. Creating a new Page Viewer Web Part
To access the properties of the Page Viewer Web Part, click the open the tool pane link. Figure 7 shows the result.
Figure 7. Setting Page Viewer Web Part properties
To use a Domino-based application in the Page Viewer Web Part, select Web Page as the type of item to display (Folder and File being the other options), and enter the appropriate URL in the Link field. The Appearance, Layout, and Advanced sections of the tool pane give you more control over the resourceâs presentation.
Click OK to save your changes. Figure 8 shows the result of including the sample Domino application within the page -- the other areas of the page (top banner and left column) arenât visible because they are empty. Youâve completed the Lotus Domino/SharePoint marriage with only a few mouse clicks.
Figure 8. The result of including a Domino application in the SharePoint site
You aren't limited to displaying the contents of a view. You can use any Domino URLs to access Domino-based data. Figure 9 shows an example of using a Domino image resource in the title bar of the SharePoint page (the IBM logo from the developerWorks site is used). You access the image resource by the standard ?OpenImageResource URL command, which has the following syntax for the sample database using a local Domino server:
Figure 9. Using a Domino image resource in a SharePoint page
In addition to referencing an image by its URL, you can use the SharePoint Image Web Part, which allows you to reference an image by its URL and also set image properties such as vertical and horizontal alignment, background color, and more. The key aspect of using the Domino URL commands is that anything accessible through a Web address can be used in a SharePoint installation.
You can also interact with Lotus Domino through a URL by using a Domino agent to display the data. This approach lets you use the Domino programming environment to process the data as needed before presentation. The simple LotusScript agent in listing 1 displays the company name from each document in the specific view from the sample application.
Listing 1. LotusScript agent to display the contents of a view
Sub Initialize Dim s As New NotesSession Dim db As NotesDatabase Dim vw As NotesView Dim doc As NotesDocument Set db = s.CurrentDatabase If Not (db Is Nothing) Then Set vw = db.GetView("Companies") Set doc = vw.GetFirstDocument() While Not (doc Is Nothing) Print doc.CompanyName(0) Print "<br>" Set doc = vw.GetNextDocument(doc) Wend End If Delete doc Delete vw Delete db Delete s End Sub
The script accesses the Companies view of the database and displays the contents of the CompanyName field from each document in the view using a Print statement. Working with Lotus Domino with HTTP requests can be extended to use the XML features of both platforms.
Working with XML
XML is as much a part of Lotus Domino as it is of the .NET Framework. Both include parsers and extensive XML support, simplifying data exchange between the platforms. One of the easiest ways to access XML from Lotus Domino is through Lotus Dominoâs inherent support in a view with the ?ReadViewEntries URL command. Listing 2 shows the XML generated for the Companies view in the sample database.
Listing 2. XML generated using the ?ReadViewEntries command for the sample database
<?xml version="1.0" encoding="UTF-8" ?> <viewentries toplevelentries="2"> <viewentry position="1" unid="62AB3655123C7D6E85257228001484AF" noteid="8F6" siblings="2"> <entrydata columnnumber="0" name="CompanyName"> <text>Baseline, Inc.</text> </entrydata> <entrydata columnnumber="1" name="CompanyContact"> <text>Tony Patton</text> </entrydata> <entrydata columnnumber="2" name="CompanyEmail"> <text>firstname.lastname@example.org</text> </entrydata> </viewentry> <viewentry position="2" unid="90B3859793C60C2385257228001479BF" noteid="8FA" siblings="2"> <entrydata columnnumber="0" name="CompanyName"> <text>ACME Products</text> </entrydata> <entrydata columnnumber="1" name="CompanyContact"> <text>Joe Smith</text> </entrydata> <entrydata columnnumber="2" name="CompanyEmail"> <text>email@example.com</text> </entrydata> </viewentry> </viewentries>
You can integrate XML in a SharePoint page with the XML Web Part. You can select the XML Web Part and drag it to the desired location on the page. Figure 10 shows the SharePoint page after the XML Web Part has been added and the open the tool pane link has been clicked to configure the XML.
Figure 10. XML Web Part added to the page
Figure 10 displays the options for the XML. Clicking the XML Editor lets you directly type the XML to be displayed; and you can use the XSL Editor to enter any Extensible Stylesheet Language (XSL) to be applied to the XML. In addition, you can enter the paths to the XML and/or XSL in their respective fields. For the purpose of demonstration, you use the XML from listing 2 along with XSL entered directly into SharePoint.
Click the XSL Editor button and enter the XSL from listing 3 to format the Domino-generated XML for the sample database view. This XSL displays the contents of the view in an HTML table with the company name in the first column and the email address in the second column.
Listing 3. XSL to format the Domino view contents in an HTML table
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html><body> <h2>Companies</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Company</th> <th>Email</th> </tr> <xsl:for-each select="viewentries/viewentry"> <tr> <td><xsl:value-of select="entrydata [@columnnumber=1]/text"/></td> <td><xsl:value-of select="entrydata [@columnnumber=2]/text"/></td> </tr> </xsl:for-each> </table></body> </html> </xsl:template></xsl:stylesheet>
Figure 11 shows the data displayed in the XML Web Part in the upper portion of the page.
Figure 11. Domino view formatted with XML and displayed in the XML Web Part
In addition to the standard XML generated by Lotus Domino, you can generate XML using a Domino agent. Along the same lines as listing 1, an agent can generate the contents of the view formatted as XML. You can also develop your own Web Parts using the Microsoft Visual Studio .NET development environment.
Rolling your own pages
Although XML and Lotus Domino serve most purposes, you may encounter situations in which you need to develop your own ASP.NET pages to present Domino data. These pages may access Lotus Domino using Web services calls, COM, ODBC, or a native data provider, such as the Propulsion N2N Lotus Notes/Domino data driver for .NET. This approach lets you build applications using the full features of ASP.NET, while using the Lotus Domino backend. The one caveat with using COM is that SharePoint and some instance of Lotus Domino must be installed on the same machine.
Reuse, don't replace
The strong support for open standards, such as Web services and XML, makes it easy to integrate disparate products such as Microsoft SharePoint and IBM Lotus Domino. SharePoint is a platform for delivering various sources through a Web interface. You can easily include Domino-based applications and data with standard or custom SharePoint Web Parts as well other avenues. Leveraging existing Domino applications lets it peacefully live in the same enterprise as a SharePoint environment.
- developerWorks Lotus article, "Using IBM Lotus Domino in a Microsoft .NET application"
- developerWorks Lotus article, "Integrating IBM Lotus Domino Directory with Microsoft Active Directory using ADSync"
- Microsoft Windows SharePoint Services Web site
- Microsoft Office SharePoint Portal Server product information
- Download a trial version of Lotus Domino from developerWorks.
- Download a trial version of Lotus Notes from developerWorks.