Bring information and collaboration into the context of your daily business processes using composite applications
As I wrote in this entry some weeks ago we've planned to add some @Formulas and LotusScript APIs to find out in an NSF whether the NSF runs as part of a composite application and to get component view specific configuration for a NSF within a specific rectangle in a composite application.
It turned out that our PIM team has already built one of these @Formulas since they needed it internally for the mail and contacts applications in Notes 8.0. So the good news is that you can use it now in 8.0 as well:
It allows you doing certain things if you run in a composite application that are different when running 'standalone'. For example you can hide certain action buttons in a view when running inside a composite application. Or you can navigate to another page via cross page wire when doubleclicking on a Notes view entry rather than just opening the document in a window without any other components.
If you have any questions that are not related to a certain blog entry or if you want to provide general feedback, pls just add a comment to this entry. You can always find a link to this entry in the right column under 'Favorites'. It is called 'Ask Questions or provide Feedback'.
I hope this will help me to sooner respond to your questions. I saw one question only today after several days under an old blog entry since this blog doesn't allow subscriptions to comments to blog entries.
I've been asked recently by different customers, BPs and ISVs what the advantages of composite applications in Notes 8 are. Here is my take on it from a technical perspective.
Mix & match of components through standardized inter component communication
Most importantly composite applications provide an extended way to allow rapid application programming. Rapid application development has always been one of the main reasons why Notes/Domino has been that successful. While you can still do all the cool things that Notes has provided in the previous releases, composite applications re-emphasize this aspect again and push it to another dimension. You can now easily assemble new applications by re-using existing components in new contexts.
The components in composite applications (the rectangles in the UI) are coarse grained components with well defined interfaces. While you can even have framesets and frames communicating via profile documents and such, the key with composite applications is that they provide a standardized way to do this type of communication. This standard mechanism is what we call property broker using WSDLs under the cover.
The property broker allows also a loosely coupling of components. This is important for a mix & match of components and an easy aggregation of components into new composite applications on demand. Re-use of finer grained components has not been proven successfully in the industry except of standard libraries like Swing that have been defined by an organization with a lot of influence. I personally think that the component model in composite applications is one of the only models that allows such a re-use of UI components within a department, between departments in an enterprise, between ISVs and customers, etc.
I think that composite applications have the potential to significantly change the way customers, ISVs, system integrators and business partners make business. For example BPs could much easier re-use the same components in different applications for different customers. Some ISVs can focus on building components instead of complete solutions. Customers could have much more flexibility when choosing third parties to build their applications. Some higher skilled customers will be able to extend a CA and improve an already existing solution without having to request simple changes from ISVs. ISVs can focus on developing components and new CAs instead of having to make every change for a customer. Some customers will also feel more empowered by their ability to customize and extend CAs. Advanced LOB users can assemble and extend CAs without requiring developers to make every change and understand every detail of the solution or process.
As I wrote a clear advantage of composite applications in Notes 8 is the possibility to use reusable components in applications. This opportunity is best achieved by BPs, ISVs, etc. building and distributing such components. We're working to build a public catalog to help share these components. This catalog is expected to come fairly soon. It is up you, our developer community, to help populate this catalog and really build an ecosystem around composite applications.
Support for more component types through Eclipse
As everyone is aware of Notes 8 bases on Eclipse. This gives us many new capabilities and many new ways to do the same things differently, maybe for some people easier.
With Eclipse, SWT and JFace you have maximal flexibility in terms of developing sophisticated user interfaces. This was one of our main reasons to build the new and modern UI for the PIM applications with Eclipse. We just get a lot of cool UI libraries for free from the Eclipse community and can focus on collaborative functionality rather than infrastructure. This doesn't only save us time within development, but also allows us providing more functionality for our customers. I'd think that there are many external people that would want to use Eclipse for this purpose as well.
Maximal flexibility however never means that you get all of this for free. Even with Eclipse and all the available libraries you need to manually code a lot of this. However I think providing a more difficult way to implement certain features is better than no way to do this.
While more flexibility for UI development can also be done today in Notes 7 (e.g. by embedding objects and controls) I personally think that there are advantages of doing this with Eclipse/Java. First of all you can build re-usable components for multiple platforms without even having to recompile code. Then you have even more flexibility where to put your extensions/code. Not only forms can be used to embed objects but you have the whole rectangle in the UI. You can even contribute menu actions to wherever you want.
The other advantage of Eclipse compared to other ways to embed other component types is that there is a well established community around this. The established community allows two things. First there are people that know how to build Eclipse components. Students learn this at university, many people have come across Eclipse in previous projects etc. Even if your company doesn't have these skills yet, it is relative easy to get them and there is relative little risk that building up these skills wouldn't pay out.
By providing Eclipse as a first class citizen in the Notes client, Notes can also attract new markets and new customers that haven't been interested for different reasons in Notes yet, but now can continue to build Eclipse applications and then use the advanced collaborative functionality provided by the Notes layer on top of Eclipse.
The second advantage of the well established Eclipse community are the existing tutorials, samples, articles and re-usable applications, often even available as freeware. A perfect example is BIRT which is an open source project to do graphical reporting. It is easy to imagine that someone could take BIRT, add a Notes data adapter and then put it as component in a composite application.
Eclipse and Expeditor also allow us through the extensibility to run JSR 168 portlets locally. This doesn't mean that the whole server side logic is automagically taken offline but you can now build portlets running on server and on the client in online mode. For example you could now easily take some very popular portlets from the portal catalog and run them in Notes.
Features that couldn't be done in previous Notes releases and features that can now be done easier
I'm a big fan of Notes and had been long before we started with composite applications. I think Notes allows you to do incredible applications and there are features like the NIF facilities, the replication, security etc. I haven't seen in any other product. I also understand that our partners have done things with Notes that we in development have not even anticipated when we built Notes features.
That having said I think that there are features in Notes 8.0 and that there will be features in Notes 8.x that you couldn't do in previous Notes releases. Let me give a concrete sample. Notes 8.0 comes with a new type of API, an UI API, for the PIM applications. The PIM apps support some properties and some actions. Granted, these APIs support only minimal functionality yet, but we didn't feel comfortable putting in more functionality since we usually wait a whole release cycle before we make APIs public. But you can imagine that at some not distant point of time you can extend the PIM functionality WITHOUT design changes to the PIM templates. This is possible since you can reuse PIM components in new applications and use the property broker to interact with other components.
Also the rectangles in the UI can be easily minimized and maximized in composite applications. This is not easy to do with frames in a frameset. However this is an important UX pattern when you use multiple peripheral components on a page. You don't always want to see everything expanded.
Eclipse also allows embedding other types of components. The embedded browser is a good example. In Notes 8.0 the embedded browser is a re-usable component for composite applications allowing to set the URL to display initially via component preferences in the CAE as well as to pass in new URLs to display at runtime via property broker. Other HTML rendering engines like Gecko can also very easily be used from Eclipse components. Another example are the Personal Productivity Editors that we've planned also to provide as components at some point.
You can also pass in context to Eclipse components in composite applications allowing these components to behave slightly differently depending on this declarative configuration. This will also be possible for NSF components in Notes 8.0.1. This context is defined using the CAE when the CA is assembled instead of when components are built. This allows developers to design components which accept context and LOB users assembling composite applications can specify different parameters to increase the resuability of components.
Notes applications are typically very form based. In previous Notes releases other components had to know the field names of forms to populate some fields. With composite applications UI services (the actions of components with property broker) can be provided to encapsulate the storage layer and provide real business services like in SOA.
Santosh Kumar is the lead developer of a Lotus Component Designer team. He has implemented a great sample composite application. It shows how you can re-use an existing Eclipse component in a composite application in Lotus Notes 8.0. The Eclipse reporting component he is using allows displaying Notes data graphically. The description below is from Santosh. He is also trying to publish more information about this on developerworks.
Using open standards-based Eclipse technology, Notes 8 is brining new ways of creating composite application by combing different services and application. Notes 8 is making it easier to integrate line of business solutions and data in new type of applications. The Reporting Composite Application one such sample application providing ability to create graphical reports over domino databases in Notes environment using Eclipse based open source reporting system.
This application leverages composite application infrastructure to create graphical and analytical reports over Domino and present in single context for the end user. It reuses the existing established and well know Eclipse open source project BIRT http://www.eclipse.org/birt/phoenix/ for reporting solution and creates capability to create reports as composite application in Notes.
Users can visualize Domino data in different type of charts (ex Pie chart, bar charts ) , aggregate, and filter information resulting in getting more value from domino data. They can highlight results in report tables matching some specified criteria and drill down to specific notes document. Also users can configure to use different report template to visualize compelling reports.
The screenshot shows that sales lead report for selected company “De Vlaming Inc”. The Eclipse component at bottom shows report appearing for different types of leads the company is engaged in. The table has filtered results for selected company and highlights the leads whose “Revenue is greater than 200 units”. The charts on right hand side show distribution of total revenue from each type of leads.
In the above snapshot, highlighting enables to identify “new” lead with certain amount of revenue and selecting that row will open that specific Notes document. This enables users to quickly find information and collaborate effectively in context of operation. One can also specify particular domino database on which report can be generated and contextually drive from different database, like sales discussion database.
The solution involved creation of Domino connectors for Eclipse Reporting solution ( BIRT) ,using its run time engine to visualize report and leveraging composite application infrastructure to enable it as composite component in Notes. The solution is extensible to create report on any domino database, provide better analytics of information by specifying filtering, grouping and graphical visualization of domino data all in context of user operation.[Read More]
The BIRT sample from Santosh Kumar is now (finally) available on IRIS sandbox. It includes the source code so that you can extend it.
It has been difficult to find certain information in the blog. I've created this entry with pointers to the most important blog entries. You can access this entry always from the Favorites section in the right column.
How to get started with Composite Applications on the Rich Client
Benefits and advantages of Composite Applications in Notes
Myths and facts about Composite Applications
Sample: BIRT component
Sample: Web clipper component
Building Composite Applications for Lotus Notes 8.0 movies
Redbook: Building Composite Applications
Sample Rich Client Applications and Components
Sample: BIRT component
Sample: Web clipper component
Sample: Browser integration
Sample: Lead Manager
Sample: Tagging service
Sample: Productivity Editor to preview attachments
Sample: Integration of MS Office
Sample: Team dashboard
Sample: Open mails in context
Sample: How to run XUL applications in Notes 8
Simple tutorials of NSF based applications with NSF and Eclipse components
Building composite applications for Lotus Notes 8.0 with IBM Education Assistant
More sophisticated tutorial of NSF based applications
Redbook - Building Composite Applications
Benefits and advantages of Composite Applications in Notes
Myths and facts about Composite Applications
Types of components in composite applications
Lotusphere 2007 presentations
Reusable components in Lotus Notes
Designing NSF and Eclipse components articles
Types of Composite Applications in Portal 6
Value add of Portal based composite applications
NSF based update sites
Installation of Composite Application Editor
Launch options for NSF based Composite Applications
Storage of NSF based composite applications in NSFs
How to run Notes from the Eclipse IDE
How to develop Eclipse components from Eclipse IDE
Usage of OSGI console
Installation of Eclipse features in Notes 8.0
Debugging of NSF components
Logging of composite applications in Notes 8.0
Cached composite application data in Notes 8.0
Property broker tool - Debug tools
Property broker tool - Action emulation
Property broker tool - Tracing a property
Debugging and provisioned features
Lotus Expeditor 6.1.1 toolkit
Patterns and Techniques
Property Broker on Rich Client
Notes 8.0.1 Features
Reusable Rich Client Components
Composite Applications in Portal
Ask your questions and provide feedback
The IBM Education Assistant contains now information about how to build NSF based composite applications and NSF components in Lotus Notes 8.0: http://publib.boulder.ibm.com/infocenter/ieduasst/lotv1r0/index.jsp?topic=/com.ibm.iea.notes/notes/8.0b1/CompositeApps.html
It essentially describes in short movies how this sample application can be built in 10 steps. So you can quickly learn the technical composite application concepts without writing code.Niklas[Read More]
In many scenarios you want to re-use existing NSFs in new composite applications as they are. Any change to the design of the databases must often be avoided. This is the same pattern for different types of components, e.g. native applications or web applications. Since the apps you want to integrate have been implemented by different people at different times it is often hard to find people that even could do the necessary changes. Even if you have skills in your company you really want to avoid touching running systems. And even if you get people to approve extensions you want to avoid them anyway if possible since the extensions cost money. Even if the development costs are minimal (e.g. add a WSDL file in database design) another deployment step is necessary.
So we were thinking about how to provide properties and actions with NSF components out of the box in 8.0.1. I think this is a first good step but we can and want to do certainly more in this area. And we want to provide more out of the box properties and actions for other types of components.
The description below is from Bhavan Kumar, the tech lead of the Notes property broker team.
The advantage of built-in properties and actions is that a separate WSDL file need not be added to any of the Notes components in order to take advantage of the publishing and action invocation. Thus any existing Notes component can take part in a composite application without any changes to its design.
Registration + The preference “com.ibm.notes.enablePreferences = true” needs to be set on the page containing the Notes components.
+ The preference “com.ibm.notes.enablePreferences = true” needs to be set on the page containing the Notes components.
+ “com.ibm.notes.enableBuiltInPB=true” preference should be set on each Notes view component in the advanced properties tab of the CAE to register the WSDL automatically.
+ The preference “com.ibm.notes.publishBuiltInPropsFromView = [viewname1],[foldername1]” should be set to publish the property from the specified view/folder.This will be honored on the Notes side only if one other column is also publishing.
Built-In Property - SelectedNotesDocumentURLChanged
Built-In Action - FilterCurrentUIViewViaCategory Built-In Action - SearchCurrentUIView + Restrictions: - does not allow to pass in a formula to do parametric searches.
Built-In Action - SearchCurrentUIView + Restrictions: - does not allow to pass in a formula to do parametric searches.
- does not allow to pass in a formula to do parametric searches.
I think there are different things being discussed in the blog entry from Bob yesterday that we need to separate.
In Notes 8.0 we have a so called built in property (http://www.ibm.com/developerworks/blogs/page/CompApps?entry=built_in_actions_provided_by). This built in property publishes the Notes URL of the currently selected Notes document.
In 8.0 there is also a built in action (http://www.ibm.com/developerworks/blogs/page/CompApps?entry=built_in_property_to_publish) that allows filtering the current UI view by a key.
I did these two features in 8.0 to show the direction I'd like to take. There are many more things we could out of the box but as always we had to stage it in.
In 8.0.1 my team added one more built in action which is an action to perform a full text search on a database with a certain key.
The major extension in 8.0.1 is that you can use to one built in property and the two built in actions WITHOUT chaning the already deployed databases. You don't have to put a WSDL in there anymore.
HOWEVER the testing couldn't be contained for this feature. We tried to be creative and are still trying to get it officially in 8.0.1. Pls speak up if these features are critical for 8.0.1 (I think they are) since it would make it easier for us to get them in.
Update after initial blog entry (10/31 7:30 AM EST): I just learned that we got the ok in the meantime to put this feature in 8.0.1. Great !
The JSON discussion is pretty separate to the built in property and built in actions. It is a way to handle complex datatypes even though our system only supports single value strings. At this point it is only a design recommendation for component developers. There is no more support planned for 8.0.1 but we are looking in providing more in 8.5 (e.g. a LotusScript JSON API).
Component developers can use JSON to handle their own complex datatypes. What Bob wrote yesterday is an extension of this where we could just take an object that represents a Notes view entry and pass it to other components in a JSON serialized form. That is a convenience functionality so that component developers don't have to do this for this standard scenario where you want to publish data from a Notes view entry to other components.
Hope that helps clarifying things.
Many customers want to leverage existing NSF components in composite applications without any or minimal design changes. Especially they don't want to do any LotusScript programming to provide generic actions that every NSF component could provide out of the box. Because of this we've introduced in the first public beta of Lotus Notes 8.0 a first so called 'built-in action' that is provided by the Notes container. We identified a very common use case where an existing Notes view in a composite application is displayed but filtered by a certain category which is a property that other components pass in at runtime. Essentially this built-in action allows filtering the current UI view in a rectangle in the UI to show only certain entries that match the first sorted column in the view.
Let's take a look how you can use this feature. I've modified our simple tutorial again. Here is how the application looks after my changes. The component view at the bottom shows a Notes view that is categorized and only shows documents with the category selected in the component view at the top.
First I added another component view to the application to display the view 'by category' from the discussion database.
Then I updated the WSDL. Just download this file, rename it to sample.wsdl and refresh it into the discussion NSF using Domino Designer. The important pieces that I had to add to the WSDL are these:
<part name="CategoryPart" type="xsd:string"/>
<portlet:action name="FilterCurrentUIViewViaCategory" caption="Filter current UI view via category" description="..."/>
<portlet:param name="Category" partname="CategoryPart" caption="Filter via built-in action" description="..."/>
You can use whatever captions and descriptions you want. The important parts are that the action is called 'FilterCurrentUIViewViaCategory' and that it has an input property of the type 'xsd:string'.
After this you need to define the two wires in the CAE. One from the top component view to the old component view with the embedded view and a second wire from the component view at the top to the new component view at the bottom that uses the built-in action.
I think this concept of built-in actions is very powerful. For 8.0.1 we're trying to provide two more built-in actions:
1. full text search action that performs full text search in NSF
2. action to open any arbitrary Notes URL in a rectangle with a NSF component
Additionally we're thinking about a way to avoid having to add or update the WSDLs in the NSFs. Every NSF component could define via preference in the CA XML (through the CAE) whether it wants to register the built-in actions. We would then just read the WSDL with the built-in actions from the Notes plugin Java code so that the registration can be done by the Notes container without any changes to existing NSFs.[Read More]
A typical composite application use case in Lotus Notes is that you select something in a Notes view and then want to update some other component based on the currently selected document. You can do this easily in a declarative way by publishing the value of a column in a property. However this only allows publishing a column's value, not a Notes URL of the currently selected document.
The value of the property is a Notes URL pointing to a Notes document, e.g. "Notes://www.mycompany.com/leads.nsf/By+Rep/35AE8FBFA573336A852563D100741784?OpenDocument".
The following directories contain composite application data that is cached in Notes 8.0. It is possible to delete all of this data. It is re-created when the app is re-opened the next time. Deleting this data should never be necessary though. But maybe this information is helpful for some advanced developers or support people.
Nathan Freeman from Lotus911 has implemented a very nice carousel component for composite applications in Lotus Notes 8x. It is basically a graphical navigator that can be used in many different scenarios. The following screenshot shows a Notes database with contacts. When you select another view entry the carousel brings the appropriate person in focus and when you select an entry in the carousel the Notes view selection changes to that entry.
Here is a bigger version of that screenshot: http://www.ibm.com/developerworks/blogs/resources/CompApps/c1.jpg
In order to use it for your own Notes database you only need to add a few lines of code, primarily in the postopen view event and in the onselect view event. Both events use a script library that Lotus911 provides with classes like CarouselConnection and CarouselUIView.
Nathan has started a blog about this component: http://www.bleedyellow.com/blogs/carousel/
He uses JSON to put multiple values like the Notes URL and the display name in one property that is then published to the carousel component. Another thing that you don't see in the screenshot but that I really like is the packaging. The whole application is in one Notes database. He used (parts of) the updatesite.ntf to store the Eclipse code in the database together with the comp app definition and the contacts design notes and data.
Jo Grant from our ISV enablement team has produced a catalog with 22 reusable components.
I personally think that there are some pretty good components in there and also some weaker ones but even they give some ideas about how they could be extended. One component that I like a lot is the NotesURL component. It allows to listen for Eclipse selections in a Notes view. So you can listen for selection changes in the Notes view and get a NotesURL for the current view entry WITHOUT changing the NSF and adding a WSDL to it. The NotesURL component can then read any other field from the Notes document by using internally the Notes Java APIs. It then publishes one or multiple of these fields to other components that can do something with these changed values.
In order to use this and other components just go in the CAE and add a component via update site. When you use the URL "nrpc:///__852573710072208D/site.xml" you get all components provisioned as soon as you drop one of them on your page. Note that the URL in the xxx.txt file is wrong "nrpc://__852573710072208D/site.xml" since there is one "/" missing.
Other good components are the web clipper, Notes name, document viewer, web launcher and Sametime business card. I think it describes our vision to build reusable components to assemble comp apps in a mix & match kind of way. As always it is not perfect in the first stage. For example I learned again that our UI to set advanced component properties needs to be much better. But again, we had to stage it.
In the next weeks we'll also post some recipes which are samples that show how to use these components together with other NSFs. These repipes can then be re-done via CAE only - without doing WSDL, Eclipse Java coding, etc.
In the first week our catalog with utility components had 200 downloads at OpenNTF.Org.