9 min read

With the addition of composite applications to the development strategy of Notes/ Domino 8, there are a number of changes required to Domino Designer 8 to allow for composite applications design, development, and use. Some additional new tools were also required.

These changes augment existing functionality. They were made without sacrificing supportability of existing applications. They allow legacy applications as well as new applications to play a part in an SOA by providing a platform that permits multiple technologies to be combined into a single application, side by side.

Composite applications support

New Domino Designer 8 features that support composite applications include the Property Broker Editor and the Composite Application Editor.

Property Broker Editor

One of the first things you will notice in Domino Designer 8 is the new support for composite application design elements. These design elements store the WSDL and XML files for wiring properties and applications. You can see these new design elements by selecting the Composite Applications item in the view.

New Features in Domino Designer 8

The Wiring Properties view is where Domino Designer stores the WSDL that defines the properties, types and actions for the application. These design elements are edited with the Property Broker Editor, which is new in Domino Designer 8. To edit wiring properties, select the wiring property from the new Notes 8 mail template and click the Open File button. This will bring up the Property Broker Editor.

New Features in Domino Designer 8

The Property Broker Editor allows you to create or edit the Properties , Types, or Actions for your applications. Once the Property Broker Editor has saved the WSDL as a design element, you will be able to associate the defined properties and actions with other design elements.

Composite Application Editor

Also within the Composite Applications view within Domino Designer 8, is the Applications listing. These design elements store the XML that defines the makeup of the composite applications and their associated wiring.

However, launching the Composite Application Editor is not done via the Domino Designer interface and may confuse new composite application developers. To launch the Composite Application Editor, open Notes and then select Actions | Edit Application.

New Features in Domino Designer 8

Once the Composite Application Editor is open, you can select a component and then edit the wires for this component.

New Features in Domino Designer 8

The illustration above shows the wiring properties for the Notes Calendar Navigator component.

Web service consumers

Web services were supported starting with Notes/Domino 7. However, the web services supported with Domino 7 could only be web service providers. They could be called as a normal web service from a remote computer and return information from Domino databases, or perform other Domino-related functions. It was also possible in release 7 to write web service consumers and have them hosted by Domino, but there was no specific support for web service consumers within Domino and creating them was a matter of Java development.

With the release of Notes and Domino 8, Domino-based web service consumers are supported. Notes/Domino applications can now call web services hosted on remote computers. Notes/Domino 8 makes it simple to call web services. Domino Designer will even import the WSDL and create the code required to use the web service for you.

Unlike web service providers in Domino, which are stored in special design elements, web service consumers in Domino 8 are stored in a special type of script library. This script library can be written in either Java or LotusScript. Just as with other script libraries, code that wants to use the web service consumer must use the script library that contains it.

Consuming a web service in Notes/Domino 8 is very simple. The high level steps are:

  1. Locate a web service that you would like to consume and acquire its WSDL file.
  2. Create a new script library to contain the web service consumer.
  3. Import the WSDL file into the new script library.
  4. Have your application call the script library so as to consume the web service.

For this example, we have selected a free stock quote web service that retrieves 20-minute-delayed quotes from Yahoo. The web service description and its WSDL file are located here:
http://www.webservicelist.com/webservices/f.asp?fid=37722

We will create a script library to contain the web service, create a form with a simple button to prompt the user for a company symbol, and then call or consume the web service and display the resultant stock quote.

New Features in Domino Designer 8

Once you have selected a web service to consume and have its WSDL file, you need to create a new script library to contain the web service code. Create a new application, and select Create | Design | Script Library. Select either LotusScript Library or Java Library depending on your language of choice. For this example, we will create a LotusScript Library. Save the script library and provide a name for it when prompted. For this example, we called the script library stockquote. Keep this script library open.

New Features in Domino Designer 8

You now have a new, empty script library. At the bottom of the code window in Domino Designer, you will see a button labeled WSDL. This button will allow you to import the WSDL file that describes the web service that you are going to consume and also generate the code for consuming this web service. This will save you a lot of time going through the WSDL file and crafting your classes!

Import the WSDL file that you downloaded for your selected service. Notice that Domino Designer generates the class required to consume the web service.

For the free stock quote service selected, the generated LotusScript code looks like this:

New Features in Domino Designer 8

Notice that Domino Designer did the hard work of decoding the WSDL file to create a class with functions to consume the web service. If you like, you may even decide to modify the generated code so as to make it a bit more readable—for example, by changing the class name.

It is a good idea at this time to inspect the code that was generated and become familiar with it. In this example, we can see the generated LotusScript created a class called NetxmethodsservicesstockquoteStockQu_n0 and a function called getQuote. Domino Designer got these values from the WSDL file that was imported. We will use the class name and the function name later within our button that will call the script library that consumes the web service.

Now, all we need is some code to consume the web service via the special web services enabled script library that we just created. To keep things simple, let’s create a button on a form that will prompt the user for a stock symbol and then display the results.

Create a blank form. Within the Globals section of the form, place the following code, which disallows implicit variable declarations (a good practice) and identifies the script library stockquote as used within the form:

Option Public
Use "stockquote"

New Features in Domino Designer 8

On the same form, create a new button. Give the button a clever label like Get a stock quote, and then insert the code (as seen in the previous screenshot) into the button:

Save the form, and then open the application. Create a new instance of the form that contains the button.

New Features in Domino Designer 8

Now click on the button to invoke the code within it. You will be prompted to enter the stock symbol whose quote you would like to retrieve via the web service. For this example, we selected my favorite hamburger chain.

New Features in Domino Designer 8

When you click on OK, Notes will execute the code so as to invoke and consume the web service. Once that has been done, Notes will then process the Messagebox call so as to present the results.

New Features in Domino Designer 8

This is obviously a very simple example of consuming a web service, but it should open your mind to the possibilities. There are web services available for almost anything you can imagine. Some are free and others are available for a fee. You can use web services to retrieve grocery items by UPC number, perform credit card transaction processing, and even track packages shipped with FedEx or UPS.

Now that Notes/Domino 8 can consume web services, you have another data integration tool at your disposal.

Domino IBM DB/2 integration

The ability to use DB/2 as an alternative backend storage system for Domino was available in Domino 7 as a trial feature and also via a limited availability program. With the release of Notes/Domino 8, the integration with DB 2 will be generally available on certain Windows, IBM AIX, and Linux operating systems.

Using this integration, you can make data within your Domino databases available for use by relational database tools and show external relational data within Notes/Domino views and embedded views.

View enhancements

Domino Designer 8 view enhancements include new column number formats, extended to use available window width, defer index creation until first use, and show default items in right-mouse menu.

New column number format

There is a new number format for number columns that will display the column contents in kilobytes, megabytes, or gigabytes, which makes it much easier to determine the relative size of the number represented in the column. In this example, the size of file attachments is used.

New Features in Domino Designer 8

When displayed in Notes 7, the column shows just the size of the attachment for each document.

However, when the same column is displayed in Notes 8 with the Bytes (K/M/G) number format, the column displays a much friendlier format.

New Features in Domino Designer 8

Extending to use available window width

In Notes 8, you can select which column within a view will expand to utilize the available width of the window. In previous releases, this option was only available for the last column in a view.

New Features in Domino Designer 8

For this option to work, the view level option Extend last column to window width takes precedence and must be deselected. In addition, the column to be extended must be marked as Resizable. Multiple columns can be designated to extend to use the available window width. However, only the first column, which has this attribute set, will expand.

Defer index creation until first use

Index creation can now be deferred for Click on column header to sort view columns. Using this option, the view index won’t be created until a user first clicks on the column to sort it. Only views that users click to sort will have their indexes built. This can help reduce the load on servers, as not all column indexes will be created automatically. They will only be created when they are used.

New Features in Domino Designer 8

Note that the deferred index creation feature requires the database to be using the new ODS (On-Disk Structure) for Notes/Domino 8. By default, Notes/Domino 8 still creates databases with ODS 43, which was introduced in release 6 and used through releases 7 and 8. To enable the creation of databases in ODS 48 format, use the Create_R8_Databases=1 Notes.ini parameter on the Domino 8 server or the Notes 8 client.

Show default items in right-mouse menu

Developers have been able to add custom actions to the right-mouse menu with previous versions of Notes/Domino. With release 8, you can choose not to have the default right-mouse menu items shown in the menu, allowing just the menu items you select to be displayed.

New Features in Domino Designer 8

The default is to show just default items. The picture above shows that we have deselected the option, allowing only the actions that we select to be shown in the menu. This will make it easier for the end user of the application to find the actions we have defined for the view or folder.

LEAVE A REPLY

Please enter your comment!
Please enter your name here