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.
New Domino Designer 8 features that support composite applications include the Property Broker Editor and the Composite Application 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.
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.
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.
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.
Once the Composite Application Editor is open, you can select a component and then edit the wires for this component.
The illustration above shows the wiring properties for the Notes Calendar Navigator component.
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:
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.
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.
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:
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"
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
There is a new rich text lite field option that allows you to add a thumbnail picture to a form. This new feature is used in the Notes/Domino 8 address book templates.
For example, in the personal address book template, you can add pictures of your contacts to their contact records. This is handy to help remember the face that goes with the name.
To add the thumbnail picture to a contact note in Notes 8, edit the contact record, click on the import icon, and select the picture.
Once the picture has been selected, it will be displayed in place of the import button.
To delete the picture, you should edit the document, select the thumbnail, and press the Delete key.
To enable thumbnails in your rich text lite field, select the second tab of the properties box, and then select Thumbnail in the Only allow selection field. When Thumbnail is selected, all of the other options will automatically be deselected for you. Also, you may only select Thumbnail in the First display property.
You can also have Notes resize the thumbnail image by selecting the Width and Height in pixels.
Agents can now be tagged so as to determine when the server starts. These agents will start the server a few minutes after the Domino server boots up. They should not be relied upon to start immediately.
Agents triggered to start when the server starts will not run when just the agent manager itself is restarted. They will only run when the entire Domino server is started. This allows agents to perform actions that should only occur after a server has started and not be repeated each time agent manager starts up.
To trigger an agent this way, select When server starts for the On event trigger type.
Agents that are triggered when the server starts can also be given dates to start and stop running. This could be helpful if the agent is implementing a date-driven business process.
To edit these agents' schedule properties, click the Edit settings button on the Agent properties box.
Domino Designer 8.5 includes several enhancements to formula language and LotusScript.
The following are some selected new commands that are available within Notes/Domino 8.
@Command([CopySelectedAsTable]):
This new command performs the same action as its menu command counterpart, Edit | Copy As | Table, which copies one or more selected view entries into a table. It places the table of the selected view entries on the clipboard. It also includes a link to each of the documents in the table. This is very useful when sending co-workers links to documents from a database in a preformatted table.
@Command([OpenInNewWindow]):
This new command allows your formula language code to open a document from a view, folder, or calendar in a new window instead of opening it within a new tab within Lotus Notes.
The following are some selected new classes, methods, and events available within Notes/Domino 8. The NotesProperty
and NotesPropertyBroker
classes, and the Onselect
event were added to support the new composite application-programming model.
MarkAllRead
and MarkAllUnread
methods: Finally, within the NotesView, NotesViewEntryCollection
, and NotesViewNavigator
classes, two new methods dealing with read/unread marks are available. Using these classes, you can mark documents as having been read or unread using the MarkAllRead
or MarkAllUnread
methods. These methods will affect the documents within the collection or navigator. There are, of course, Java counterparts available.
NotesDirectory
class: Objects created with this new class correspond to the directories on a specific Domino server or Notes client. The objects are contained within a NotesSession
object, and they contain one or more NotesDirectoryNavigator
objects. The following properties are available in the NotesDirectory
class. Unless otherwise specified, these properties are read-only.
Property |
Type |
Description |
---|---|---|
|
Variant array |
This property is set by the methods |
|
Variant array |
This property will contain the names returned from the most recent |
|
|
This property contains the name of the view specified in the most recent |
|
|
Read/write property. This property controls which directories will be used during lookups. If the property is |
|
|
Read/write property. If |
|
|
Controls whether or not lookups will match on partial names. If |
|
|
Read/write property. If |
|
|
This property contains the name of the server represented by the instance of |
|
|
Read/write property. This property controls which directories will be used during lookups. If |
|
|
Read/write property. This property controls whether the server of the context database or the server specified in the lookup methods will be used. If |
The following methods are available for the NotesDirectory
class.
Method |
Returns |
Description |
---|---|---|
|
|
Used to create additional |
|
|
Since the resultant name lookup buffers can be quite large, this method can be used to free memory in the current lookup buffer, in effect resetting all navigators. Used for memory management. |
|
|
Performs a lookup of designated items contained within the specified view. |
|
|
Performs a lookup of designated items contained within the specified view for the specified items. |
NotesDirectoryNavigator
class: NotesDirectoryNavigator
objects are returned by methods of the NotesDirectory
class and allow the developer to navigate the items returned by a directory search. The following properties are available for the NotesDirectoryNavigator
class. Unless otherwise specified, these properties are read-only.
Property |
Type |
Description |
---|---|---|
|
|
This property will contain the current item for the |
|
|
An index to the current match for the |
|
|
The name of the current match indicated by the |
|
|
Contains the name of the directory view used to create the |
|
|
If |
|
|
If |
The following methods are available for the NotesDirectoryNavigator
class.
Method |
Returns |
Description |
---|---|---|
|
|
Moves the navigator of the first match of the current name in the |
|
|
Moves the navigator of the next match of the current name in the |
|
|
Moves the navigator of the nth match of the current name in the |
|
|
Moves the navigator to the first name in the |
|
|
Moves the navigator to the next name in the |
|
|
Moves the navigator to the nth name in the |
|
|
Returns the value of the first item of the current match. |
|
|
Moves the navigator to the next item within the current match and returns the value of that match. |
|
|
Moves the navigator to the nth item within the current match and returns the value of that match. |
NotesProperty
class: This class represents a single component property within the composite application. Component properties are data items that a given component produces and the NotesProperty
class allows your application to manage the publishing of the defined properties within an application.
The methods for the NotesProperty
class are only active when used within the Notes 8 Standard configuration. They are not available when used by applications running on Domino server or from within the Notes 8 Basic configuration.
The following properties are available for the NotesProperty
class. Unless otherwise specified, the properties are read-only.
Property |
Type |
Description |
---|---|---|
|
|
This class property returns the description for the |
|
|
If |
|
|
This class property returns the name of the |
|
|
This class property returns the namespace for the |
|
|
This class property returns the title of the |
|
|
This class property returns the type name of the |
|
Variant array of |
This read/write class property sets or returns the array of values for the |
The following methods are available for the NotesProperty
class.
Method |
Returns |
Description |
---|---|---|
|
N/A |
For output properties only, this method clears the new or modified values of the specified property from the temporary cache used for publishing via the property broker. If called from an input type |
|
N/A |
Publishes to the property broker the new values for the |
NotesPropertyBroker
class: The following properties are available for the NotesPropertyBroker
class. This is where all the composite application magic occurs in Notes/Domino 8.
The current implementation of the property broker for Notes/Domino 8 only supports a single input property. The InputPropertyContext
is, however, declared as an array to allow for future expansion of the property broker to support multiple input properties in the future.
Unless otherwise specified, the properties are read-only.
Property |
Type |
Description |
---|---|---|
|
Array of |
Returns an array of |
The methods for the NotesPropertyBroker
class are only active when used within the Notes 8 Standard configuration. They are not available when used by applications running on Domino server or from within the Notes 8 Basic configuration.
The following methods are available for the NotesPropertyBroker
class.
Method |
Returns |
Description |
---|---|---|
|
N/A |
Clears the new or modified values of a specified property from the temporary cache used for publishing. |
|
|
Returns a |
|
Variant array of |
Returns the value of a specified input property. Used when implementing an action. |
|
|
If |
|
N/A |
If values of the |
|
|
Returns a |
Onselect
event: This new event was added to the NotesUIView
class to give developers the trigger needed to have other components respond to selected documents within a view. The Onselect
event is used to contain code that publishes properties to the property broker based on the documents selected.
3.21.104.72