Domino for OS/2

by John Howard

On their Domino Web page ( http://domino.lotus.com ), the Lotus Development Corporation defines Domino as server technology that transforms Lotus Notes into an interactive web application server, allowing any web client to participate in Notes applications securely. Bridging the open networking environment of Internet standards and protocols with the powerful application development facilities of Notes, Domino provides businesses and organizations with the ability to rapidly develop a broad range of business applications for the Internet and Intranet.

Domino 1.5A, for OS/2 version 3.0 and higher, was announced on December 21, 1996 and is available now. A copy of it is provided on the DevCon Java and Internet Tools CD-ROM. Domino 1.5A for OS/2 will be part of Lotus Notes, Release 4.5.1. This article discusses just a few of the product's capabilities to give the reader a basic understanding of how Domino is used to build applications for internal or external web sites.

The Domino Configuration
The Domino executable is comprised of two component blocks. The first block is the web server code labeled ICS HTTP 4.1 server. ICS is an IBM acronym that stands for Internet Connection Server. This code provides a full function web server environment to Domino for OS/2 using code developed by IBM Raleigh. HyperText Transfer Protocol (HTTP) refers to the Internet protocol used on the World Wide Web for transferring documents between web servers and web browsers. Web pages are defined using HyperText Markup Language (HTML), a simple tag based language for creating documents displayed on the Web. For the purpose of this discussion, any web browser (client) that supports HTML 3.0, including the table tags, is sufficient for allowing Domino to act as a web server. Uniform Resource Locators (URL) point to information on the Web including documents, files available through tools on the Web, and most importantly, data records in a database. Under Domino, the HTTP server examines the URL coming in and determines if the request is for a file on the Web, which is handled by the HTTP server, or for information from a Notes database, which is passed to the Domino engine. Both the HTTP server and the Domino engine return HTML to the client.

The second block is the Domino engine. The engine is responsible for interfacing between the web server and the Lotus Notes server. The Notes server is the code that provides access to client stored information in the form of mail, discussion databases, document libraries, sample databases, tracking databases, workflow databases, etc.

A block diagram of Domino's design is shown in Figure 1.

The two components of Domino work together to allow a client web browser to access the Web, as well as Lotus Notes servers (revision 4.5 or later), and retrieve and modify information contained in databases on that server. Domino is unique in that it allows users to create web sites that go beyond the common static web sites found today. Notes servers allow the user to construct a web site that can custom tailor the content to the user.

How Does Domino for OS/2 Work?
When Domino receives a request to display information (a URL), it takes the appropriate Notes constructs (navigators, views, documents and links) and converts them, on the fly, into HTML that is returned to the web browser. For those not familiar with Notes terminology, a navigator is a graphical interface to a database that may contain text as well as bitmaps, hotspots, icons, or buttons. Views represent lists of documents that include information about each document in the list. Clicking on these graphical indicators causes actions to be executed which makes Notes applications easy to understand and to use.

Domino Links
Links are a powerful feature of web sites that are simple to provide in Domino. Links are easy to add to a Notes document and allow the Domino user to switch easily from one document to another or to switch between views, folders and other databases. Domino supports several types of links. The Link Hotspots capability of Notes gives Domino applications an easy way to provide document, view, or database links by placing the hotspots in the appropriate place within the user document. Hotspots can accomplish some action or provide a link. Notes links are more desirable than HTML links because they are based on a unique Notes identifier for the object being linked. Lotus refers to an id as UNID (UNique ID). UNIDs are sufficiently unique that the replication of a database from one machine to another does not change the UNID. Hence, you can move an object to a different view or to another database and the link remains operational. An HTML link fails when a file is simply renamed or moved. An action hotspot is implemented using either an @Command formula or an @URLOpen formula as shown below: These @ capabilities make implementing hotspots quick and easy.
 *  @URLOpen(http://www.domino.lotus.com).  Takes a web client to the Domino home page.
 * @Command(FileOpenDatabase). Accept arguments such as the database, view, and navigator name arguments.
 * @Command(OpenView). Accepts the view name.
 * @Command(OpenNavigator). Accepts the navigator argument.

Another type of link is called pass-through HTML. This feature of Domino can be used to link to any database view available on the Web. Your application may have a database comprised of records that are entered in chronological order. The database is constructed to provide a by time view. To open the time view of the database, use the following HTML:  Show the By Time View In Domino, the URL syntax is comprised of a Notes object followed by the action that needs to be carried out on the object. The syntax provides flexibility by allowing for optional arguments and actions. The question mark is used to identify and separate actions; the ampersand is used with arguments.

In order for some of the above actions to happen, URL's are created by the web client. These URL's contain extensions to HTML that are supported by Domino. However, the user is not required to have any knowledge of the URL extensions.

For example, the following URL can be used to open the main database on the Domino Web site: http://domino.lotus.com/domino.nsf?OpenDatabase Notice that there is no distinct specification of the Notes server. Domino assumes the host name is sufficient to identify the database. Domino equates the host name with the Notes server name in the URL syntax. Views can be opened using URLs with the following syntax: http://yourcompany.com/yourbusinessdatabase.nsf/by+author Note that the plus (+) sign between by and author must be present as URLs cannot have embedded blanks. The same action could be accomplished with some slightly different syntax. http://yourcompany.com/yourbusinessdatabase.nsf/by+author?Open Following the name of the database with /by+author?OpenView also works.

Forms can be opened by adding arguments to the open syntax sample above. A typical example is a discussion database where customers submit questions and concerns and employees and others append responses. Below is a sample of how you might open a Hot Topic in a discussion database: http://yourcompany.com/yourdiscussiondatabase.nsf/Hot+Topic As in the previous set of examples, you could have appended ?Open or ?OpenForm to make your command easier to understand. Before we leave commands to open things, below are some examples of how to open a form, navigator, or view: http://yourcompany/yourdiscussiondb/$defaultform http://yourcompany/yourdiscussiondb/$defaultnav http://yourcompany/yourdiscussiondb/$defaultview Searching for a string in the database that interests you like locatetext can be accomplished with a command that contains both the database, view, and text to be located. http://company/db/by+author/?SearchView&Query=locatetext You now know how to use the powerful capabilities of Domino to link various kinds of information to your web page. Next, let's examine the information presentation capabilities.

Presenting Textual Information
One of the primary purposes of a web site is to entice the viewer to explore what is available on the site. To that end, the presentation of information is extremely important. Domino supports many of the text formatting features found in Notes. The following Notes features are available to the web application designer under Domino. Be aware that all web browsers do not provide equivalent capabilities. Domino may generate HTML tags not supported by your browser.

Notes provides the database designer with many different options with respect to type. These include size, font, color, style and some formatting options. Domino chooses to map point sizes into HTML sizes. However, font sizes are not mapped to HTML headings. The following table shows the mappings: Point Size   HTML Size 8           1   10            2   12            3   14            4   18            5   24            6 > 24            7 Domino supports all of the Notes font styles. The fonts provided include a selection of Serif and Sans-Serif fonts like Helvetica and Times Roman. The text can be normal, bold, italic, underlined, strikethrough, and superscript. Most of the fonts are proportionally spaced. However, Notes does provide monospaced fonts, such as Courier, on OS/2. Courier is useful because it allows the user to present columns of numeric data where each entry in a column of figures is under the entry above. Text colors available in Notes also are available in Domino.

Domino also supports the following Notes features: The Full Justification and No Wrap options of Notes currently are not supported in Domino. Also, you should be aware that formatting features like indentation, interline spacing, tabs, and others are lost when displayed with a web browser.
 * Bulleted lists
 * Numbered lists
 * Named styles
 * Formatting of the text using alignment options such as left justified, right justified and centered

Presenting Information in Graphics and Images
Domino works with several types of image files available on the web. These include Graphics Interchange Format (GIF) and Joint Photographic Experts Group (JPEG). Domino passes the information available on scaling as well as the size of the image to the browser. However, the browser may not be able to use the scaling information. Hence the image may appear in it's original size. The pass-through HTML feature mentioned previously can be used to reference images.

Organizing Your Web Site
Now that you have the basics down, let's examine how to get your web application started. When using Domino to access information on the web, the application developer begins by creating one or more Notes databases. These databases provide the source and repository for the information used by the application. A typical web site might contain a home database supplying the visitor with information about your product or service; a database to capture information about the user such as name, address, telephone and credit card numbers, etc.; and possibly a discussion database where questions could be asked by new and existing customers and answered by company personnel or experienced customers. The design of the web site can take almost any configuration to meet the needs of the business.

Begin by establishing a home page for your web site application by following these Lotus Notes steps: Once you have decided on the design of the web site and know what databases are required, you can use the power of the Lotus Notes access control feature to determine which users can gain access to a given database. Access control additionally can be applied to views, documents, and fields for Domino. Notes access control provides database access as follows: Many web sites today only provide the user with reader access. A business application must be interactive and be able to gather information from the client. This operation is handled in Notes by allowing the user to fill in a form. The captured information is placed in a database where it is processed by an agent. An agent can be set up to go into operation when a new document is created or modified, when a form is initialized, saved or terminated, when a button is clicked, and when the user enters or exits a field in edit mode. The agent then can add the new information to things like the public address book or a customer list database. Agents make use of LotusScript as their definition.
 * 1) Create a home page element in a Notes database. An About page of a database or a Navigator can serve as the home page for Domino.
 * 2) Set the Launch option for the home database to launch either your Navigator or your About page. This is found on the launch tab for the database properties.
 * 3) The public address book has a Home URL setting in the HTTP server section that is used to bring up the home database when accessed by a web client.
 * No access: User cannot access item.
 * Depositor: User can only add an item but cannot see it or change it. This can be used to capture information about a user like name and e-mail address.
 * Reader: User can only read an item such as a product/service catalog.
 * Author: User can create items as well as edit the ones they create.
 * Editor: User can modify an item but not submit original items. This provides a great way to handle discussions or question and answer sessions.
 * Manager: User can decide what access other users are granted.

LotusScript is a modified form of the Basic programming language that is similar to the implementation of Microsoft's Visual Basic. However, LotusScript is designed to be cross-platform so that OS/2, UNIX, Windows 3.11, NT, or 95, or Macintosh all provide an acceptable platform. In fact, some Visual Basic application code can be used directly in LotusScript. Notes data can be manipulated by classes from LotusScript. These classes fall into either the user interface or the database access categories. The user classes allow the workspace and the currently open document to be manipulated. The database access classes provide access to Notes objects.

Security Considerations
Domino is built on Notes and Notes was designed with security in mind. Notes considers security starting with data as small as a field up to sections of a document, the whole document, forms, views, databases, servers and even the network through which the information flows.

Summary
Lotus Notes has what you need to build a complete business application that can be accessed from your web browser. With Domino, the robust features of Lotus Notes are available to a web application today. These features allow a developer to build any type of information viewing, information gathering, or group collaboration application imaginable.