Mindoo Blog - Cutting edge technologies - About Java, Lotus Notes and iPhone

  • LS10 session sample #1: Notes Bookmark tools

    Karsten Lehmann  30 January 2010 15:43:12
    This is the first sample that we developed for our Lotusphere session about the Java APIs of Lotus Notes 8.5.1. And it's already the first one that we did not  actually show at Lotusphere, because we ran out of session time in our rehearsals and felt the need to reduce the amount of live demos.

    The sample plugin is called "com.mindoo.bookmarktools". It adds two actions to the Open List of Lotus Notes:

    Image:LS10 session sample #1: Notes Bookmark tools

    Locate on workspace
    This action uses the methods NotesUIWorkspace.addDatabase(NotesDatabaseData) of the new UI API, but instead of adding databases to the client's workspace, it actually only leverages the fact that addDatabase selects already existing databases and opens the right workspace tab.
    As you may know, we are the developers of the MindPlan application (mindmapping and project management based on Lotus Notes). That's why my Open List looks like this when I'm searching for the keyword "mindplan" in my bookmarks:

    Image:LS10 session sample #1: Notes Bookmark tools

    Sometimes you want to know where a specific database is located on your workspace. One way is to open the database in the client and then switch to the workspace, where in most cases the right database chicklet is selected. That takes a lot of time in case the database needs to be loaded from a server. And sometimes opening the database does not really help to find it on the workspace, for example if the database opens a frameset that displays a view of your mail database. In that case, it's the mail database that is selected on the workspace, not the database with the frameset.

    This new action helps in this case.

    Open as workspace

    The second action "Open as workspace" is something that you might know from older Notes Clients, e.g. from version R7. You could right click on a bookmark and select "Open as workspace". This would open a new tab that displays the bookmark folder content as chicklets like this:

    Image:LS10 session sample #1: Notes Bookmark tools

    Well, although this feature has not been officially implemented in the 8.x Standard Client (the was some discussion whether it should return in 8.5.2, but IBM decided to keep it out of the Standard Client), there is a way to open the workspace view for a bookmark folder.

    Actually, it's pretty simple:
    You may know that the Notes URL "notes:///ClientBookmark?OpenWorkspace" opens the normal workspace tab.
    All you have to do is add a query parameter "id" to that URL: "notes:///ClientBookmark?OpenWorkspace&id=0". That ID is the internal bookmark folder id. The id 0 tells the workspace viewpart to display the first level of your open list (e.g. with your mail, calendar and a chicklet to start Domino Designer).
    I haven't found out so far where the other id's come from (just checked the design of the bookmark.nsf, but it's no obvious ID of the folders design elements). But by using some internal Notes functions, we are able to grab the folder id when you right click on an Open List entry and launch the corresponding Notes URL.

    So, what to do with this second action? I don't know. :-)
    My first thought was to use this special Notes URL in a Composite Application, something like my personal start page for the Notes Client. You can for example use the Notes Document Container to display this URL and send URL changes to the "SetNotesDocumentURL" action to switch between several workspace folders. In my first tests, quickly changing this URL did not appear very stable (the client crashed) and I did not look into this any further.

    Anyway, here are the source code for this sample and an update site for the installation (please refer to this article if you don't know how to install from an update site).

    I will be presenting a session about the new Java APIs of Lotus Notes 8.5.1 at the German Entwicklercamp conference (Developer camp)

    Karsten Lehmann  28 January 2010 07:30:23
    Now that Lotusphere is over, we are already preparing for our next session, this time for the German Entwicklercamp conference.
    The topic is Add-ons for Notes Client/Domino Designer based on new Java APIs of Lotus Notes 8.5.1 (track 4, session 5 in the session list).
    It's similar to our Lotusphere session, so if you missed it at Lotusphere, make sure to not miss it again. :-)

    The Entwicklercamp is an annual conference taking place from 8th to 10th of March in Gelsenkirchen, Germany, with a well known list of both national and international speakers and a lot of high-quality developer sessions.
    You can find more information on the Entwicklercamp website. Unfortunately it's only available in German language, but maybe Google translator will help you out if your German needs some training.

    Our Lotusphere 2010 slides: BP203 - Leverage the New Java APIs in IBM Lotus Notes 8.5.1!

    Karsten Lehmann  25 January 2010 00:41:24
    We had a very positive response to our session about the Notes Client and Domino Designer extensibility Java APIs in Lotus Notes 8.5.1 at Lotusphere.
    All the feedback evaluations where either "Excellent" or "Good" and in addition, we also got personal feedback from 4-5 participants (even in the bus to the Hollywood studios on Wednesday) who especially liked the fact that we showed so many demos.

    Well, to be honest, we even planned and developed more demos than we actually could show. We decided to remove some of them when we were doing a test run in the hotel room and easily exceeded the session limit of 60 minutes. :-)
    If you look at the original BP203 slides that we submitted back in December and compare them to the presented slides, you will notice the missing pieces.

    Since removing some of the demos was a last minute decision, all of them were already developed and running. So we plan to publish them in this blog in the next few weeks. Simply publishing the code would not help you much to learn about the Eclipse/Expeditor platform. That's why we will explain them in detail, each demo in its own blog article.

    Let's start this demo article series with the session slides. Click on the image to download the PDF file:

    Image:Our Lotusphere 2010 slides: BP203 - Leverage the New Java APIs in IBM Lotus Notes 8.5.1!



    Our LS10 session offering on Wednesday: BP203 - new Java APIs in 8.5.1 with up to 10 demos, 2 undocumented Notes functions and Lotusscript like you have never seen it before

    Karsten Lehmann  20 January 2010 06:26:26
    Our session "BP203 Leverage the New Java APIs in IBM Lotus Notes 8.5.1!" will provide a high-level overview of two new Java APIs in Lotus Notes 8.5.1 - the UI API and the Domino Designer API.
    Instead of showing too many technical details, our plan is to focus on real-life scenarios for the new APIs.

    We have created a collection of up to 10 demos for both APIs, including
    • a universal help system for the Notes sidebar that provides information for the current database, form and field
    • an integration of Mikkel Heisterberg's LotusScript.doc into Domino Designer
    • an alternative picture based address selection dialog for emails that can be used without modifying the mail template

    and we'll demonstrate ways how LotusScript code can communicate with the Eclipse framework to leverage the new API functionality as well.
    This will include an application that uses multithreaded LotusScript - a new technology to move your long running LotusScript tasks into the background in order to make your Notes applications snappier.

    Come and join us on Wednesday from 3:00pm - 4:00pm in DL S. Hemisphere III !

    And please also join us on Thursday from 7:00am - 8:00am in SW Toucan 1 to share our experiences with Application Architecture based on Composite Application (BOF206).

    Lotusphere announcement: LS2Eclipse - Leverage Eclipse/Expeditor features in your Lotusscript code!

    Karsten Lehmann  11 January 2010 13:53:17
    If one of the following questions sound familiar, this blog article may be interesting for you:
    • You have Notes applications and want to bring them to the 21st century without rewriting everything in Java/JavaScript?
    • Your users often sit at their desk waiting for your Notes application because of a long running Lotusscript operation?
    • Composite Application technology looks interesting, but the Lotusscript APIs are not dynamic / powerful enough?
    • As a Lotusscript developer, you always hated it to hear those Java guys saying "That's easy. All you have to do is call this Eclipse API..." :-)
    During our own Notes/Domino development in the past years, we often needed Eclipse API functionality in places where it was not available, like a classic view action, a form or an agent.
    New features always got added to the "outside world", the Eclipse/Expeditor framework, but the classic Notes client and the Lotusscript language nearly stayed the same over the years.
    While Java development for Eclipse/Expeditor has many advantages compared to classic form/view development of Lotus Notes, it surely makes development more complex and you loose the rapid application development approach that Lotus Notes made so successful.
    In addition, long-time Notes users have an existing code base of thousands of lines of code, that they cannot simply rewrite in Java/JavaScript to create a new Java UI or XPages based application.


    We think that there is a missing piece between classic Notes and the Expeditor framework of Lotus Notes R8.x. This is our main use case for Mindoo LS2Eclipse.

    Mindoo LS2Eclipse is a bridging technology that makes Eclipse APIs accessible from Lotusscript code.

    The following image is a rough overview of the LS2Eclipse architecture:

    Image:Lotusphere announcement: LS2Eclipse - Leverage Eclipse/Expeditor features in your Lotusscript code!

    The installation kit contains an Eclipse plugin (packaged as a widget for easy deployment) and a set of Lotusscript libraries.
    Those libraries with a rich set of about 50 object-oriented Lotusscript classes give you access to many powerful Eclipse features, divided into the following 7 areas:

    JobTools
    The JobTools area is a key feature of the LS2Eclipse API. It is the key to running your application code in multiple threads, thus making it possible to keep the user interface responsive even if a long-running operation (e.g. storing an email in a CRM system on a Domino server) is active.
    Your Lotusscript code runs as a so called Eclipse Job, a background process that can optionally display a progress dialog with status/progress information.

    Feature overview:
    • Bridge between the Eclipse job framework and Notes agents
    • schedule the execution of an agent as an Eclipse background job
    • pass parameters to the job
    • jobs can report progress and can be cancelled on user request
    • Notes UI is responsive when job is running, job may change the UI during execution (e.g. to present the result)
    PlatformUI
    The PlatformUI area let's you read and interact with the Eclipse workbench, which is the graphical framework that is displaying the Lotus Notes client.

    Feature overview:
    • Read the structure of open windows, tabs and their contents (Eclipse views)
    • focus tabs, show/hide/minimize/maximize views
    • Access the side shelf, show/hide shelf views and toggle the shelf between collapsed, thin and expanded
    • show text in the status bar of the Notes client and show message boxes (e.g. to display information from a background agent job)
    ComponentTools
    The ComponentTools contain a set of tool classes to make Composite Applications more dynamic.

    Feature overview:
    • call Composite Application actions of components manually without a CA wire
    • dynamically create and show content like Notes data or a web browser view
    • modify the properties of components
    • read and modify the structure of a Composite Application (component/page preferences)
    • toggle between CA pages in your code (e.g. to create a custom navigator)
    • locate open views in the workbench based on their internal ids
    NotesUITools
    This area contains features of the new Java UI API in Lotus Notes 8.5.1. With it you can interact with the Notes client user interface, even if your code is running in a background job, where the standard NotesUIWorkspace is not available. In addition, you are no longer restricted to the active area of the screen to read/write data from/to a view or a document.

    Feature overview:
    • gives you access to the Notes UI even when your code is running in a background job
    • get a NotesUIDocument/NotesUIView handle for any area (IWorkbenchPart) of the screen, not just the active one
    • modify the NotesUIDocument's content, read the current selection from a NotesUIView
    • activate a view/document in the current page
    PerspectiveTools
    In the Notes client, an Eclipse perspective is the content of a main tab. The perspective tools give you access to all registered tabs in the system and they even allow for the creation of completely new tab layouts.

    Feature overview
    • get list of registered Eclipse perspectives (IPerspectiveRegistry)
    • clone existing perspectives
    • create and display your own Eclipse tab layouts (IPerspectiveFactory/IPageLayout etc.) on the fly
    ProgramTools
    The program tools contain platform independent APIs to registered file extensions in the OS.

    Feature overview
    • find associated programs by file extension
    • get list of registered file extensions in the system
    • launch files and urls
    ExtensionRegistryTools
    Experts can use the ExtensionRegistryTools to add new Eclipse extensions to the IExtensionRegistry of the Eclipse framework.

    How does the code look like?

    We tried to name the Lotusscript objects similar to their corresponding Eclipse API objects. That way, you already know most of the important Eclipse APIs if you start coding in Java later on and searching for code snippets on the internet is made easier.
    To get a feeling for the API, here is a small code snippet:

    To create a new API connection, you use this syntax:

    Dim connection As EclipseConnection
    Set connection=EclipseConnectionManager.createConnection()

    To access the PlatformUI, type in this:

    Dim platfUI As PlatformUI
    Set platfUI=PlatformUIFactory.getInstance(connection)

    The IPartService is a class to get the currently active area (IWorkbenchPart) of the screen:

    Dim partService As IPartService
    Dim part As IWorkbenchPart
    Dim vpart as IViewPart
    Dim classes as EclipseAPIClasses
    Dim partTitle as String
    Dim partId as String
    Dim partSecondaryId as String

    Set classes=connection.EclipseAPIClasses 'helper to cast an object to another API object
    Set partService=platfUI.getWorkbench().getActiveWorkbenchWindow().getPartService()
    Set part=partService.getActivePart()
    If classes.IViewPart.isInstance(part) then
            'part is a IViewPart; this gives us additional properties
            Set vpart=classes.IViewPart.cast(part)
            partTitle=vpart.getTitle()        
            partId=vpart.getId()
            partSecondaryId=vpart.getViewSite().getSecondaryId()
    End If


    Where to get the API

    The API is feature complete, but we still have some documentation to write. For example, I'm currently working on a database with test cases that may be handy to learn about the new features.
    It currently contains the following 12 cases:
    • Case 1 - Workbench information
    • Case 2 - PartService, get information about the active viewpart
    • Case 3 - Viewparts in the current page
    • Case 4 - Schedule background agent jobs
    • Case 5 - Change the UIDocument in another viewpart
    • Case 6 - Get the selection from a Notes view in another viewpart
    • Case 7 - Create new NSF viewparts in the current page
    • Case 8 - Create new NSF viewparts in a different tab
    • Case 9 - Manually call actions of CA components (change content of a document container)
    • Case 10 - Create a new Eclipse perspective layout with placeholders for new views
    • Case 11 - Compare selected documents in a new Eclipse perspective
    • Case 12 - Toggle the sidebar mode between collapsed/expanded/thin
    If you are interested and will be attending Lotusphere next week, come to our session about the new Java APIs of Lotus Notes 8.5.1 (BP203) on Wednesday from 3:00 until 4:00 pm or wake up early on Thursday to join us in our birds-of-a-feature session about "Application Architecture based on Composite Application technology" (BOF206) from 7:00 until 8:00 am.

    I will post an info in this blog, when a trial version of LS2Eclipse is available.

    Our Birds-of-a-Feather session has been selected by the Lotusphere attendees!

    Karsten Lehmann  10 December 2009 16:32:54
    Good news from IBM today: Our BoF has been approved for Lotusphere 2010. That's our second approved session and particularly great because the BoF sessions were voted by the Lotusphere attendees.
    Our session is one of those that they would most like to see on the agenda.

    This is IBM's description for this kind of session:

    Audience: Any and all Lotusphere attendees
    Description: Come one, come all! Birds-of-a-Feather sessions are a popular feature of Lotusphere, bringing together communities and individuals with similar interests. These sessions are informal, interactive discussion groups for like-minded attendees to share ideas and experiences in an small group, open forum setting.


    And here is our session abstract:

    Application Architecture based on Composite Application technology


    Composite Application technology builds a bridge between several worlds. With it you can transfer information between programming languages like Java and Lotusscript, fill Symphony spreadsheets with the contents of a Notes view, sent commands to host applications and even automate Windows applications.
    With the introduction of XPages for the Notes client, CA technology gains additional momentum, because they are the way to go, if you need interaction between your XPages application and the surrounding Notes client platform.
    We would like to share our experiences with Composite Application technology and discuss how an application architecture based on Composite Application technology could look like if you start designing it from scratch.

    We are really looking forward to Lotusphere and are heavily working on cool demos for our session about the new Java API's of Lotus Notes 8.5.1.

    One Lotusphere 2010 session approved!

    Karsten Lehmann  17 November 2009 20:38:06
    We just received an email from IBM telling us that one of our session submissions for Lotusphere 2010 has been approved.
    The title is:

    Add-ons for Client/Designer leveraging new Java APIs of Lotus Notes 8.5.1


    This is really cool, because it's our favorite topic. Those new APIs can be used for many small useful Notes and DDE add-ons and I'm sure we will have some nice giveaways for the session.

    See you in Orlando!

    XPages series #8: Dynamically creating the UI of an XPage in Java

    Karsten Lehmann  10 November 2009 23:11:23
    This 8th part of the XPages series is more or less a link to a great blog posting that was just published my Tommy Valand.

    It demonstrates how you can create a dynamic web user interface by leveraging JSF features in your XPages application.
    In his example, Tommy produces a data table UIComponent with a snippet of Java code that is executed with the click on a button.

    Image:XPages series #8: Dynamically creating the UI of an XPage in Java

    I'm currently working on something similar for a customer project, but unfortunately I cannot say much about technical details at the moment.
    Basically, it's about dynamic application UI creation based on an abstract UI description. The system produces a dual-output: it dynamically creates the UI of an XPage, but it also creates a Java UI (e.g. a set of Swing components) with a similar form layout.
    Write once, run anywhere. :-)

    The concept includes its own data layer that works independent from Lotus Notes and has some fancy features like transaction logging (even for storing in Lotus Notes databases).

    I recommend that you take a look at Tommys posting and start thinking about your personal use case for this. Anything is possible.

    In my next blog series posting I'm going to write about my own bean manager for managed beans that I needed as a workaround for security limitations when running an XPages application in the Lotus Notes client.

    Today Mindoo joined IBM’s Design Partner program for Quickr 8.5

    Karsten Lehmann  4 November 2009 13:42:02
    We are now active participants in IBM's Design Partner programs for Notes/Domino and for Quickr 8.5. I'm currently installing the first Quickr 8.5 code drop on one of our development servers.

    We would like to thank IBM for letting us participate!

    Speaking at Notesusertage 2009 (Notes user days, German conference) on the 5th of November - register until the 25th of October!

    Karsten Lehmann  22 October 2009 21:49:23
    Actually I'm not part of the main program, but demoing two applications that we are developing for our partner Haus Weilgut in a parallel customer track.
    The first one is a pretty large XPages application framework (about 10 Java projects combined into one NSF). Let's call it a "UI generator", but it's actually a lot more than that.
    The second application is a quite powerful relational reporting engine for Lotus Notes data. Something like "NotesSQL2". :-)

    The Notesusertage conference is an annual German Notes conference located in Karlsruhe, Germany.

    Registration is open until the 25th of October. Conference fee is 69 Euro.

    Here is the German conference description from the Notesusertage website:


    Warum in die Ferne schweifen, wo das Gute doch so nah.

    Erfahren Sie, wie Sie konsequent Ihre Lotus Notes- und Domino-Plattform im Unternehmen ausbauen und tauschen Sie sich mit Gleichgesinnten aus.

    Die Notes Usertage treffen den Nerv der Zeit:
    Anhand praktischer Beispiele aus großen und mittelständischen Unternehmen lernen Sie neue Erweiterungsmöglichkeiten kennen, mit denen Sie Investitionen in neue Systeme und Schnittstellen vermeiden. Dabei bringen Sie Ihre Infrastruktur auf den Stand, den die aktuelle Rechtslage erfordert.

    Mehrwert mit Lotus Notes, das bedeutet:
    • unternehmensweites CRM
    • Wissens- und Projektmanagement
    • wirtschaftliche und rechtskonforme Archivierung von E-Mails
    • Kopplung mit ERP-Systemen
    • Ressourcenplanung
    • Optimierung mit Blackberry
    • schneller Zugriff auf Informationen
    • Reporting, Business Intelligence
    • ... und vieles mehr!
    Neue Funktionen, Module und moderne Technologien machen Ihr Unternehmen leistungsfähiger und helfen Ihnen, vorhandene Ressourcen besser zu nutzen.