Karsten Lehmann 14 September 2009 17:55:08Disclaimer: IBM Lotus Notes/Domino 8.5.1 is prerelease code and there are no guarantees from IBM that the functionality presented or discussed will be in the final shipping product.
Today two interesting videos have been posted to the Domino Designer wiki that demonstrate how XPages in the Lotus Notes client 8.5.1 can be integrated with other components by using them as components of a Composite Application.
Component definition for XPages
The first video shows how to transform an XPage into a new design element type called Component, that can then be used in a Composite Application. For a Component, you can define your own properties in order to configure the referenced XPage for a specific use case.
In the video, this is used to alter the theme of the XPage and to show and hide elements within the XPage's UI depending on the property value. By defining component properties, your XPages become much more reusable and configurable. The purpose is to reuse the same XPage in many different contexts (inside Composite Applications) without the need to change a line of code.
XPage of the discussion database as a component in a Composite Application (click to watch the video)
Wiring XPages components to other components
In the second video, the XPage is wired to a mail database component and a web browser component. They communicate in both directions by sending Composite Application properties:
Clicking on links in the XPage changes the search query on the web and generates a new email with pre-filled fields. In the other direction, clicking on an email in the inbox opens the mail sender's article list in the XPage discussion database.
Composite Application of an XPage, a Notes Java view and a browser component (click to watch the video)
The video contains pretty simple examples, but when you understand the idea behind the whole concept, a lot more can be achieved with this technology. It's a great opportunity to extend the functionality of "XPages in the client".
In Lotus Notes 8.5.1, the pure XPages runtime will only provide basically the same as in the web browser. But by using Composite Application technology, you can easily add features to your application that are not yet available for XPages.
Let's take a look at another use case:
You could produce a formatted text in the code of your CRM XPages application (e.g. your own XML format from the user's selection) and publish it through a CA wire. Either you or any other developer can then build a CA component to receive and process this content.
They could e.g. develop it in Lotusscript to produce some fancy Notes richtext output or write an Eclipse plugin in Java to automate the Symphony office suite that is build inside Lotus Notes to create a new document, like a letter or even a complete report spreadsheet.
In this use case, the components that take care of the content output to richtext/Symphony, could also be hidden helper components without UI contribution to the Composite Application.
Although the first XPages implementation for the Lotus Notes client 8.5.1 is basically more or less a portable web application container, you can use Composite Application technology to add more functionality.
The benefit of the Composite Application architecture is to mix a lot of technologies for the purpose of a business use case without the need to redevelop cross-technology interfaces over and over again. Composite Applications have a simple data exchange system: The CA components use simple strings to send and receive data to other components. Components are connected through so called Composite Application wires to exchange this data.
Hopefully, the integration into the Notes client will be further improved in later Lotus Notes releases. The JSF technology that the XPages runtime is build upon, provides a technology called custom render kits. They can be used to create alternative output formats of a JSF application, e.g. native Java rendering in SWT or Swing or maybe solutions for mobile phone.
Although developing a custom render kit is a lot of work, this might be a way to enrich the XPages experience with native controls (like Java views and the native Notes richtext editor) in a later Lotus Notes version. Another approach could be to extend the XULRunner that the XPages runtime uses in the client to render the UI.
- Comments