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

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 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

The iPhora Journey - Part 4 - JSON is King - The How

  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 The iPhora Journey - Part 4 - JSON is King - The Why The iPhora Journey - Part 4 - JSON is King - The How As we mentioned yesterday, in reimagining Domino, we wanted Domino to be a modern web application server, one that utilized a JSON-based NoSQL database and be more secure compared to other JSON-based NoSQL platforms. A Domino document existing within a Domino database is the foundational data record used in iPhora, just as it is with traditional Domino applications. But instead of just storing data into individual fields, we wanted to store and process the JSON in a Domino document.  However, text fields (AKA summary fields) in Domino documents are limited to only 64 KBytes, and that is a serious limitation. 64 KBytes of JSON data does not even touch what the real world typically transfers back and fo