Chapter 9. What's New in Notes/ Domino 8 Development

For the past 20 years Lotus Notes and Domino have been the premier collaborative application platform of choice. Small businesses and Fortune 50 companies alike are using the Notes/Domino application platform for email, calendaring and scheduling, instant messaging and applications.

There are hundreds of IBM business partners supporting the community of approximately 130 million users with their daily blogs, web sites, podcasts, and support forums. Any visit to LotusSphere, the IBM's premier end-user conference for the Lotus brand, will leave your head spinning with a myriad of possibilities to integrate Notes/Domino with other technologies in your business.

So, what exactly is the strategy for the future of Notes/Domino development? Given that IBM has a history of protecting their user's investments in the platform, the strategy is obviously one of extension of the platform while continuing to support legacy applications.

All of the applications written for the platform have one thing in common, the end user. The end user operates in a specific context. For Notes/Domino users, this context is one of Notes for collaboration (email, calendaring, and instant messaging), an operating system with its file system for other work such as storage and retrieval of documents, and other applications and office technologies.

The IBM strategy for Notes/Domino is to allow the user, in his or her context, to collaborate more effectively in more and new flexible ways while maintaining the ability to support legacy and new open composite applications.

One way this is being done is by allowing developers new and better ways of taking complicated and related applications, and placing them together to create new conceptual whole applications, or composite applications (applications that are composed of two or more applications). In order to allow this within the Notes/Domino application platform, IBM has added new development tools and features, allowing Notes/Domino the ability to take part in the new world of Service Oriented Architectures (SOA, seeChapter 3) while continuing to support the rich legacy of applications already built.

Composite Applications

Composite applications are applications that consist of two or more components that may have been independently developed, working together to perform tasks that none of the member applications could perform by itself. Each component publishes and consumes messages from other components, and performs actions based upon user interaction or information received from other components. Support for composite applications is one of the central points for Notes/Domino 8. Composite applications in Notes 8 can wire together multiple components from Notes applications, Lotus Component Designer applications, and Eclipse into a single application context for the end user.

Composite applications, whether they are based on Notes/Domino 8, WebSphere Portal, or Lotus Expeditor, are the "front end" or user interface to an enterprise's SOA strategy. They, in effect, consume the services that are offered by the composite architectures put in place to support SOA.

An example of a composite application would be a simple customer relationship management application. This application needs to display a list of accounts, opportunities, and contacts to end users.

The accounts component should display accounts owned by the end user. When the end user selects an account in the account component, the opportunities for that account should be displayed in the opportunities component, and all of the contacts for the first opportunity should be displayed in the contacts component.

In the application described above, the components are "communicating" with each other by publishing and consuming properties via a property broker. When the user clicks on an account, the account component publishes the accountkey property to the property broker. The opportunities component has been written to "listen" for the accountkey property to be published, and when it is, it performs a lookup into a data store pulling back all the specific opportunities for the published account key. Once it has displayed all of the opportunities for the account, it selects the first opportunity for display and then publishes the opportunitykey property to the property broker. The contacts component then performs a lookup to display all of the contacts for the opportunity.

When the user selects a different opportunity, the opportunity component again publishes an opportunitykey property and the contacts component receives this new opportunitykey property and displays the correct contacts for the selected opportunity.

Using component applications, developers can respond quickly to requests from the line of business for functionality changes. For example, in the case of the customer relationship management application described above, the line of business may decide to purchase a telephony component to dial the phone and log all phone calls made. The developers of the application would need to simply modify the contact component to publish the phone number of a contact with a name that the new telephony component listens for and the call could be made on behalf of the user.

In addition to being used within the customer relationship management application, the components developed could be put together with other components to form entirely different applications. Each component already understands what data it needs to publish and consume to perform its actions, and contains the code to perform those specific actions on back-end systems. The reuse of the components will save the developers and the organization time each time whenever they are reused.

Composite applications also require a new programming model for Notes/ Domino 8. This model mirrors the model within WebSphere Portal 6 in that multiple components are aggregated into a single UI with the property broker acting as the "glue" that allows the various components to interact and share data even if the components are from different systems. This programming model is something new in Notes 8 and required some changes to Domino Designer 8.

As a side note, the new programming model of composite applications will most probably bring its own set of problems. For example, what happens in a composite application when one of the components fails? In this "composite crash" situation, what does the composite application need to do in order to recover?

Additionally from an infrastructure point of view, composite applications will only be as available as their weakest component. What good would a reservations system implemented with many components be if one of the components were not hosted by a highly available infrastructure, while the others were? We see these sorts of issues being dealt with currently by customers venturing into the composite world via SOAs.

There are two main categories of change for development related to composite applications in Notes/Domino 8 application design and programming. We will look at both of them in the following sections.

Application Design

In order to allow your Notes or Domino application to participate within a composite application, you must first decide which design elements need to be accessible to other components. To make these components available to other components within your composite application, they are specified within a Web Services Description Language (WSDL) file. The composite application property broker then uses this WSDL file as a map into your application and its published properties and actions.

To allow this mapping to occur, the Composite Application Editor is used. Without making changes to legacy Notes/Domino application functionality, the Composite Application Editor can be used to surface the elements of the application such as forms, views, documents, and other Notes elements to the composite application.

Another element of composite application design is deciding where the application components will reside. Composite applications can be hosted within a local NSF file on a Notes client, on a Domino 8 application server, in WebSphere Portal, or in Lotus Expeditor. The Notes/Domino application components are created with the Composite Application Editor while WebSphere Portal composite applications can be created with the Composite Application Editor or the Portal Application Template Editor.

Programming

As mentioned previously, the addition of composite applications to the development strategy for Notes/Domino 8 required some changes and additions to the existing programming model.

Within a composite application, the components must be able to interact even if they were defined with different tools and technologies. Some components may even be stored within different database technologies. One component may be NSF based while another may be stored within a relational database store. The components need a standardized way to define the properties and actions that they support, so that an application developer can wire them together into a composite application. The standard way to define these properties and actions is via a WSDL file.

Let's take a quick look at properties, actions and wires.

Properties

Component properties are the data items that a given component produces. They are either input properties (consumed by the component) or output (produced by the component) properties. Each property is assigned a data type, which is based on the WC3 primitive data types. These include string, Boolean, decimal, time, and date. The primitive data types can also be utilized to build new data types. For example, within Notes 8, some new data types for components will be available that map to common data available within the mail, calendar, and contacts applications. Some of these new data types are listed in the following table:

Data Type Name

Extends Data Type

Description

Example

mailTo

String

List of people to receive an email

"mailto:[email protected]?subject=Our Dogs are Smart&[email protected],[email protected]&[email protected]

emailAddress822

String

Email address following RFC 822

"My Gerbil <[email protected]>"

"Little Man <[email protected]>"

distinguishedName

String

LDAP name

"cn=bubbles,ou=turtles,dc=company,dc=com"

Actions

Actions are the logic that is used to consume a property. For example, a component may implement an action that sends an email when it receives a mailTo type property from another component. The code within the component that sends the email based on the information consumed from the property is the action for the component. Components can obviously contain multiple actions depending on the business logic required for the component.

It is easy to confuse a web services action with a Notes action. The web services action is a name in a WSDL file that represents functionality that will consume a property. Notes actions can be coupled with a web services action so that the Notes action gets called to consume a property. The LotusScript in the Notes action can then implement code to act on the property.

The illustration below shows a Notes action in the Notes 8 mail template that is coupled with a web services action NewMemoUsingMailtoURL. You can see that in the code, the LotusScript is using a property broker to gain access to the property.

Actions

Wires

Wires are the construct by which components interact within a composite application. A wire is simply a programmatic definition of which components talk to each other. The components must share common properties and then produce and consume them via actions. More simply put, wires connect properties to actions.

For example, an application developer could wire together a contact list component with an email component. When the user selects a contact from the contact list, the contact list component would produce and publish a mailTo type property, which could then be consumed by the email component. The email component would consume the published mailTo property and compose an email using the data contained within the property.

The following shows the components available within the Notes 8 mail template that are available for use in other component applications as well, shown from the component palette within the new Composite Application Editor.

Wires

New Features in Domino Designer 8

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.

Property Broker Editor

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.

Property Broker Editor

Composite Application Editor

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

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

Composite Application Editor

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

Composite Application Editor

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

Web Services Consumer

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.

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor

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!

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor

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

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor

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

Option Declare
%INCLUDE "lsxsd.lss"
Const n0 = "http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/"
Class NetxmethodsservicesstockquoteStockQu_n0 As PortTypeBase
Sub NEW
Call Service.Initialize
("HttpWwwThemindelectricComWsdlNetXmethodsServicesStockquoteStockQuo teNetXmethodsServicesStockquoteStockQuoteService",_
"net.xmethods.services.stockquote.StockQuoteService.net.xmethods.services.stockquote.StockQuotePort", 
"http://services.xmethods.net/soap", _ "NetxmethodsservicesstockquoteStockQu_n0"
End Sub
Function getQuote(symbol As String) As Single
Let getQuote = Service.Invoke("getQuote", symbol)
End Function
End Class

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 by changing the class name, for example.

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 etxmethodsservicesstockquoteStockQu_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 following code into the button:

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor
Dim symbolname As String
Dim symbolvalue As Single
Dim quote As New NetxmethodsservicesstockquoteStockQu_n0
' ask the user for a stock quote symbol
symbolname = Inputbox("Enter stock symbol for quote:")
' call getQuote to consume the web service and return the value
symbolvalue = quote.getQuote( symbolname )
' Let the user know the current value
Messagebox "Value of " & symbolname & " is = " & Cstr( symbolvalue )

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

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor

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.

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor

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.

Web Services ConsumerComposite applications support, Domino Designer 8Composite Application Editor

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 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 alternate back-end storage system for Domino was available in Domino 7 as a Feature Trial 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.

When displayed in Notes 7, the column shows just the attachments lengths for each document.

New Column Number Format

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 Column Number Format

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

Extend to Use Available Window Width

Note

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.

Defer Index Creation until First Use

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.

Show Default Items in Right-Mouse Menu

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.

Form Enhancements

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.

Form Enhancements

Once the picture has been selected, it will be displayed in place of the import button.

Form Enhancements

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.

Form Enhancements

You can also have Notes resize the thumbnail image by selecting the width and height in pixels.

Agent Enhancements

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.

Agent Enhancements

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.

Agent Enhancements

Formula Language and LotusScript Additions

Domino Designer 8 includes several enhancements to formula language and LotusScript.

Formula Language Additions

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 pre-formatted 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.

LotusScript Additions

The following are some selected new classes, methods, and events available within Notes/Domino 8. The NotesProperty and NotesProperyBroker 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 contains 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

AvailableItems

Variant array

This property is set by the methods LookupNames and LookupAllNames. If a NotesDirectory object has been created but no lookups have been performed with it, this property will be null.

AvailableNames

Variant array

This property will contain the names returned from the most recent LookupAllNames or LookupNames call. If a NotesDirectory object has been created but no lookups have been performed with it, this property will be null.

AvailableView

String

This property contains the name of the view specified in the most recent LookupAllNames or LookupNames call. If a NotesDirectory object has been created but no lookups have been performed with it, this property will be null.

GroupAuthorizationOnly

Boolean

Read/write property. This property controls which directories will be used during lookups. If the property is True, only directories marked "Enable for Group Authorization" will be searched. If set to False, the default, lookups performed will search all directories available.

LimitMatches

Boolean

Read/write property. If True, directory lookups will be limited to fifty entries. If False then lookups performed will return all matches.

PartialMatches

Boolean

Controls whether or not lookups will match on partial names. If True, partial names will match. If False, the default, lookups will not match on partial names.

SearchAllDirectories

Boolean

Read/write property. If True, the default, all directories will be searched during lookups. If False, lookups will cease after the first directory containing the view name specified.

Server

String

This property contains the name of the server represented by the instance of NotesDirectory.

TrustedOnly

Boolean

Read/write property. This property controls which directories will be used during lookups. If True, lookups will search only directories which contain trust information. If False, the default, the lookups will search all directories.

UseContextServer

Boolean

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 True, the server context database will be used. If False, the default, and then the server specified in the lookup method will be used.

The following methods are available for the NotesDirectory class.

Method

Returns

Description

CreateNavigator

NotesDirectoryNavigator

Use to create additional DirectoryNavigators to allow multiple DirectoryNavigators to be used.

FreeLookupBuffer

N/A

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.

LookupAllNames

NotesDirectoryNavigator

Performs a lookup of designated items contained within the specified view.

LookupNames

NotesDirectoryNavigator

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

CurrentItem

String

This property will contain the current item for the NotesDirectoryNavigator and is updated with subsequent calls of GetNextItemValue and GetNthItemValue methods.

CurrentMatch

Long

An index to the current match for the NotesDirectoryNavigator and is updated by subsequent calls to FindFirstMatch, FindNextMatch and FindNthMatch methods.

CurrentName

String

The name of the current match indicated by the CurrentMatch property index for NotesDirectoryNavigators created with the LookupNames method.

CurrentView

String

Contains the name of the directory view used to create the NotesDirectoryNavigator object. This property is updated when directory lookups are performed.

MatchLocated

Boolean

If True, a match was successful. If False, the match was not successful.

NameLocated

Boolean

If True, a name was located. If False, the name was not located.

The following methods are available for the NotesDirectoryNavigator class.

Method

Returns

Description

FindFirstMatch

Boolean

Moves the navigator of the first match of the current name in the NotesDirectoryNavigator. Returns True if a match was found otherwise returns False indicating no match was found.

FindNextMatch

Boolean

Moves the navigator of the next match of the current name in the NotesDirectoryNavigator. Returns True if a match was found otherwise returns False indicating no match was found.

FindNthMatch

Boolean

Moves the navigator of the nth match of the current name in the NotesDirectoryNavigator. Returns True if a match was found, otherwise returns False indicating no match was found.

FindFirstName

Long

Moves the navigator to the first name in the NotesDirectoryNavigator returning the number of matches found.

FindNextName

Long

Moves the navigator to the next name in the NotesDirectoryNavigator returning the number of matches found.

FindNthName

Long

Moves the navigator to the nth name in the NotesDirectoryNavigator returning the number of matches found.

GetFirstItemValue

Variant

Returns the value of the first item of the current match.

GetNextItemValue

Variant

Moves the navigator to the next item within the current match and returns the value of that match.

GetNthItemValue

Variant

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

Description

String

This class property returns the description for the NotesProperty object.

IsInput

Boolean

If True, the property is an input property. If False, the property is an output property.

Name

String

This class property returns the name of the NotesProperty.

NameSpace

String

This class property returns the namespace for the NotesProperties data-type.

Title

String

This class property returns the title of the NotesProperty.

TypeName

String

This class property returns the type name of the NotesProperty. When combined with the NameSpace property, it provides a unique identifier for the NotesProperty type.

Values

Variant array of Strings, Integer, Real, or NotesDateTime

This read/write class property sets or returns the array of values for the NotesProperty. The array items must be of all the same data type and input properties by definition cannot be set using this property. The Publish method must be called after using this property to set values or the values will not persist.

The following methods are available for the NotesProperty class.

Method

Returns

Description

Clear

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 NotesProperty the method will have no effect.

Publish

N/A

Publishes to the property broker the new values for the NotesPropery object.

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

InputPropertyContext

Array of NotesProperty

Returns an array of NotesProperty objects, with only the first item of the array populated.

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

ClearProperty

N/A

Clears the new or modified values of a specified property from the temporary cache used for publishing.

GetProperty

NotesProperty

Returns aNotesProperyobject for a specified property.

GetPropertyValue

Variant array of Strings, Integer, Real, or NotesDateTime

Returns the value of a specified input property. Used when implementing an action.

HasProperty

Boolean

IfTrue , the specifi ed property is associated with the property broker. IfFalse, the property broker does not have a property with the specifi ed name.

Publish

N/A

If values of theNotesPropertyBroker have been modified, this method will publish them

SetPropertyValue

NotesProperty

Returns aNotesProperty object with the value of a specified output property.

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.

What's Ahead?

As you know, Domino Designer is used to create Notes/Domino applications. You have seen how it can be used to take a Notes application and build components from the various Notes/Domino design elements using the Property Broker Editor and the Composite Application Editor, and new integration points with actions and view columns.

Future plans for Domino Designer may include merging it with Lotus Component Designer within an Eclipse framework, bringing the two designer tools together into an integrated development framework for Lotus applications. All development will be performed within the Eclipse environment with new script editors and shared design element bookmark navigation.

What's Ahead?

Bringing these multiple development tools under a single designer framework will make the developer's job easier by offering them a consolidated view of the development process.

Lotus Component Designer

Lotus Component Designer is the new version of Workplace Designer, with support for WebSphere Portal 6. It is a development environment built on top of Eclipse, which allows for the creation of document based applications using visual design methods with no need to know the intricacies of J2EE.

Forms are the building blocks for applications built with Lotus Component Design. Applications can have more than one form associated with them. Each form then contains one or more controls. Controls include things like views, images, text boxes, combo boxes, radio buttons, and tables.

Once controls are placed on a form, the built-in JavaScript editor can be used to customize functionality. The JavaScript editor supports color-coding and code-assist, so developers who are comfortable developing in Domino Designer will feel right at home.

The forms and controls within a Lotus Component Designer application are used to manipulate an XML-based document model, which is stored in a relational database. This allows for the separation of the look and feel of the application from its data.

Here are some selected new features of Lotus Component Designer.

Migration Tool

Lotus Component Designer allows you to migrate components created with previous releases into release 8. The migration tool is a part of the component import process and can detect older versions of components. When an older version is detected, its pages are converted to the new XSP format.

Migration Tool

Help and Enhanced Welcome Page

The new Lotus Component Designer welcome page offers a rich set of options including an overview, tutorials, samples, Web resources, and context-sensitive help.

Help and Enhanced Welcome Page

Accessibility

Lotus Component Designer is an accessible software development tool with which you can create accessible components. It is compliant with IBM Corporate Instruction 162 (CI 162) which meets the U.S. government federal accessibility guidelines for information technology. It requires that hardware, software, services, web pages, and internal applications are accessible to persons with disabilities.

Composite Application Support

With Lotus Component Designer, you can now create applications that can work within the IBM WebSphere Portal composite application model. These components can interact with components created with Notes/Domino 8 as well.

Controls and Pages

There are many new features and additions to controls and pages. Here are a few favorites:

  • Preview images directly from the Choose Image dialog box without having to add it to the page first.

  • Create custom controls, which combine two or more controls into a single control.

  • Add UI controls that are not listed in the standard UI Controls palette, such as supported AJAX controls.

  • Web page preview without having to leave Lotus Component Designer.

Data Connections

Some of the new features and enhancements for data connectivity are the following:

  • Local connections are supported in components. Connections are the sets of information used to connect to a data source such as a database.

  • The schema editor has been improved so as to provide an easy graphical way to create and edit XML schemas.

  • Components can now store data in external data sources such as Domino databases and XML files on a target server

  • A new query editor is available to provide a more granular and flexible way to populate view queries.

  • Components can now consume external web services and manipulate the data received with JavaScript

Scripting

Some of the new features and enhancements for deployment are the following:

  • There is a new XSP file format for registry and page loading which has been made public. For more information, visit the Lotus Component Designer developerWorks web site athttp://www.ibm.com/software/workplace/products/product5.nsf/wdocs/workplacedesigner

  • A new XSP tag library is available offering a library of UI controls, data sources, simple actions and other controls. This library is located in the doccontrols directory.

  • A JavaScript debugger is now included and can be used to debug any JavaScript code that runs on WebSphere Portal 6.x.

Deployment

Some of the new features and enhancements for deployment are:

  • Components can be deployed to servers without knowledge of J2EE applications and without the administrator credentials.

  • Components can be deployed to a cluster for production deployment by exporting the components WAR (Web ARchive) and DDL (Data Definition Language) files and providing them to you administrators.

  • Basic authentication is now supported for WebSphere Portal 6.x

New Web 2.0 Features

The following are some of the new Web 2.0 features that are available in Notes/Domino 8.

RSS and ATOM

RSS and ATOM are feed formats used to publish web content that is updated on a regular basis. News organizations, governments, private companies, and even individuals via their daily blogs publish RSS and ATOM feeds. All you need to read these feeds is an RSS or ATOM reader such as Notes 8 and access to the Internet.

Feeds within Lotus Notes 8 are included as a side bar plug-in along with the Sametime Contacts, Activities, and Day at a Glance, on the right side of the screen.

RSS and ATOM

With Notes/Domino 8, you can also generate RSS feeds from Domino databases including the new blog template and Domino Web Access. The Domino RSS Syndication template is used to create the feeds from any Domino view. The agents and script libraries from this template can also be used within other applications.

The first step is to create a database to manage your feeds. Create the new application and base it on the RSS Feed Generator template.

RSS and ATOM

Once the database has been created, you will want to set up the global options that apply to all the RSS feeds that are generated. To do this, click Set Global Options in the action bar of the application.

RSS and ATOM

Using the Global options dialog, you can control the following:

  • The protocol for accessing feeds either HTTP or HTTPS.

  • The RSS <guid> element prefix either notes:// or http://.

  • The default database redirect time, entered in seconds.

  • The available feeds header, via HTML.

  • The default HTML for the feed database, via HTML.

Once the defaults are set, you can define a feed and direct it to a specific mail file, based on a user or on a specific database.

RSS and ATOM

With a feed defined, you are able to get a listing of all available feeds from the Domino server by directing your browser to the feed database that you created earlier. From this web page, you will be able to add the feed into your favorite RSS feed reader.

RSS and ATOM

Blog Template

With Notes 8 you can create your own web log, or blog, using the new Domino Web Log template (dominoblog.ntf). Once created, you can use either Notes:

Blog Template

…or a web browser:

Blog Template

…to add content and manage your blog. The resultant web page shows the first entry of the author's blog. The template allows creation of blog entries from the Notes client or from the web site itself.

AJAX Support

Domino 8 adds support for JavaScript Object Notation (JSON) as an output format.

Lotus Expeditor

Lotus Expeditor is the base platform for Lotus rich clients such as Notes 8 Standard and Sametime 7.5. It is also a product that companies can leverage to build their own rich client solutions. Built on top of Eclipse (an open source IDE), Lotus Expeditor adds the ability to create composite applications, a local data store for credentials and application data, role based provisioning, enhanced security, and offline abilities.

One of the problems with rich clients in the past was the cost of deployment and support. Rich clients are large installations that needed to be upgraded and supported. In fact, it is the cost of deployment and support that helped to drive the web based applications that we see in wide use today. Everyone with a rich client knew what version of it they were running, but there is no reason to know what version of eBay, Google Mail, or your corporate WebSphere Portal you may be using because they are server managed and was updated all the time with new features, functions, and content.

In fact as the rush towards web-based applications required more and more functionality to be supported by the browser, the "light browser" itself became very large and started to require deployment and support planning. In some instances the browser footprint on a client became larger than some rich client applications.

Lotus Expeditor can be thought of as a platform that has all the benefits of rich clients but also has the benefits of those web-based applications because it can be centrally managed. It can also been described as a "local portal" because it can be used to create composite applications that contain Notes/Domino 8 components, JSR -168 compliant portlets, SWING, and AWT applications without the need for a network connection.

Lotus Expeditor does this by implementing client side containers for the components that communicate via a local property broker implementation. This can have another benefit - speed of execution. Since the code is executing within the Lotus Expeditor platform, the composite application may not be affected by network and back-end systems latency or at least only to the extent that it utilizes those systems.

In addition to responsiveness, applications built with Lotus Expeditor can also be more reliable and portable due to their local execution and data stores. This results in a rich client that has the benefits of a browser but with a user experience that can be better than a browser due to speed, reliability, centralized management, and the ability to work online or offline. When working offline, the applications store transactions in the local data store. Once connected to the company network, Lotus Expeditor can then synchronize the transactions to the host application and may even download updates for the application itself.

Some of the applications Lotus customers can build with Lotus Expeditor include customer service and support application such as bank teller and reservations clerk, as well as sales force automation applications such as mobile CRM or insurance claims management.

Summary

In this chapter, we reviewed some of the major new features and enhancements that affect Notes/Domino 8 application development. These included enhancements related to composite applications, Domino Designer 8, formula language and LotusScript, Lotus Component Designer, Web 2.0, and Lotus Expeditor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.60.35