Skip to main content

Creating Composite Applications for Classic Lotus Notes Clients – Part 1

A new thing in Lotus Notes 8 is the ability to create composite applications using the Eclipse Lotus Notes 8 client. It is a powerful feature to aggregate visually information from different sources. It leads to a simpler looking interface with powerful results. Since I am an advocate of smaller lightweight clients, I wondered if composite applications could be created for the classic Lotus Notes clients including Notes 5, 6, 7, and the Notes 8 Basic client. The classic clients are much smaller that the Eclipse-based client and loads up much faster than its Eclipse counterpart. After experimenting for a few hours, I discovered that the answer is yes, “you can teach an old dog to do new tricks.” Though, it is possible with the Notes 5 client, it is buggy and I would not recommend it.

I have divided the presentation here into two parts, part 1 for Lotus Notes 7 and older clients and part 2 for the Lotus Notes 8 Basic client. The information that I am presenting here is an expansion of a talk that I did for the December 2007 GRANITE Lotus User Group.

You will be able to download the source code for the demo when I present part 2 of the presentation. If you would like to use this technique in your application, please go ahead and use it but please support your local Lotus Notes User Group by becoming a member and attending the meetings.

Why Composite Applications?
First, composite applications are not about Java, Eclipse, or Web 2.0. You can create composite applications using the oldest legacy system you can thing of. The concept of composite applications or mash up as some would call it allows you to aggregate information from many difference sources and tie them together visually into one single application. A casual relationship is created between data sources to deliver the information. Otherwise, you would need to hunt for the information either between screens or applications, thus reducing your productivity.

Demo
To create a composite application for the classic clients, we rely on the use of hidden frames, embedded views, the ability of Notes to preview a document from a view in a specific frame, and the “Note Developer's Savior,” NOTES.INI.


In our demo, we will aggregate data from four Notes databases and deliver it as one single composite application. If you are using Domino 8, this could include Web applications, but that is a discussion for another talk in the future. The four databases are contacts, sales, inventory, and shipping. Below is a screen shot of the demo. When you select a company in the list, the information for the company plus what they purchased will be displayed for customers. For manufacturers inventory, sales, and shipping information are displayed in addition to their contact information.


All information presented is this demo is fictitious. Any similarity is a coincidence.

Before we can display the information in our composite application we need to define the relationship between the four applications that we will be displaying in our composite application. So like a creating a relational database we need to define the primary and secondary index keys that we will use to tie the different database together. In our demo, our primary key is company_id, the unique identifier for a company.


There are primarily two types of information that we will be presenting, views and documents. All views are displayed as embedded views so that we only display information that we are looking for. The view is filtered based on the primary and secondary keys that we have defined above. For embedded views, the value that filters the single category view is determined by values stored in the Notes.ini which populate using the technique below. Similarity for documents, using either the primary or secondary index keys, we determine which document to display.



Next, we need to create a special Notes database that contains the framesets and frames that will display the content in a casual relationship. This database also contains a launch form that ties and displays the embedded views and documents associated with each company. Since the company_id is our primary key, we create a new launch document whenever we create a new company document by embedding code in the close and save button of the company form. The launch document includes all the information needed to reference the company document. The view that displays a list of company in our composite database is actually displaying a list of launch documents rather than the company documents.


On the onLoad event of the launch form, we perform two critical tasks. First we store the primary key in this case "company_id" into the environment variable, "company_id" which later will be read by the embedded views and documents to determine what is displayed. Second, we determine what information we want to populate in each of the frames and use "setTargetFrame" and open the different forms, documents, and frameset in each of the defined frames.


In the main frameset of the composite database, we include a hidden frame and set the launch form to autoframe in this hidden frame ("launchFrame"). As a result, each time you select a company in the frame "selectionFrame", a preview of the document will appear in the hidden frame. When the document opens as a preview in the hidden frame, the onLoad event of the launch document is triggered and our entire sequence of events defining what is populated in each of the frame is activated.



This approach can be further extend to the next level and display information that is filtered based on the secondary index keys. For example, after you have filtered an embedded view based on the primary key, company_id, a selection in the embedded view can be repeated to further display other information in another frame based on the secondary index key of the selected item in the embedded view.

Though you need to spend some time up front in laying out the composite application, this technique is simple to implement. In part 2 of this presentation, I will show how new features found in the Lotus Notes 8 client can simplify this process and give you more flexibility in creating composite applications using the classic Lotus Notes client. In addition, I will have the source code available for you to download.

Comments

Popular posts from this blog

The iPhora Journey - Part 8 - Flow-based Programming

After my last post in this series -- way back in September 2022, several things happened that prevented any further installments. First came CollabSphere 2022 and then CollabSphere 2023, and organizing international conferences can easily consume all of one's spare time. Throughout this same time period, our product development efforts continued at full speed and are just now coming to fruition, which means it is finally time to continue our blog series. So let's get started... As developers, most of us create applications through the conscious act of programming, either procedural, as many of us old-timers grew up with, or object-oriented, which we grudgingly had to admit was better. This is true whether we are using Java, LotusScript, C++ or Rust on Domino. (By the way, does anyone remember Pascal? When I was in school, I remember being told it was the language of the future, but for some reason it didn't seem to survive past the MTV era).  But in the last decade, there a

Creating Twitter Bootstrap Widgets - Part II - Let's Assemble

Creating Twitter Bootstrap Widgets - Part I - Anatomy of a Widget Creating Twitter Bootstrap Widgets - Part II - Let's Assemble Creating Twitter Bootstrap Widgets - Part IIIA - Using Dojo To Bring It Together This is two part of my five part series "Creating Twitter Bootstrap Widgets".   As I mentioned in part one of this series, Twitter Bootstrap widgets are built from a collection standard HTML elements, styled, and programmed to function as a single unit. The goal of this series is to teach you how to create a Bootstrap widget that utilizes the Bootstrap CSS and Dojo. The use of Dojo with Bootstrap is very limited with the exception of Kevin Armstrong who did an incredible job with his Dojo Bootstrap, http://dojobootstrap.com. Our example is a combo box that we are building to replace the standard Bootstrap combo box. In part one, we built a widget that looks like a combo box but did not have a drop down menu associated with it to allow the user to make a select

The iPhora Journey - Part 3 - Creating an Integrated UI Framework

The iPhora Journey - Part 1 - Reimagining Domino The iPhora Journey - Part 2 - Domino, the Little Engine that Could The iPhora Journey - Part 3 - Creating an Integrated UI Framework There are many ways to create the user interface (UI) for a web application. The HTML page could be created on the server and then pushed out. It could be static with the data generated on the page by the server with JavaScript, providing a more dynamic experience, or the server could generate new HTML content to update portions of the web page. XPages or PHP are good examples of this. Another method is to have the web page partially generated by the server and have JavaScript build the rest of the HTML by pulling data from the server via an API. This is the approach used in the Single Page Application (SPA) model. In all cases, it is still dependent on the web server technology being using.  As mentioned previously in this blog, XPages is dependent on complete integration between form and document, which e