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

  • The View article: Add LSDoc Support to Domino Designer on Eclipse with Custom Plug-ins (download link included)

    Karsten Lehmann  July 22 2010 10:32:43 PM
    We just received permission to blog about a new article that we wrote for THE VIEW and that went online today. The article demonstrates several interesting techniques that can be used for Notes client and DDE plugin development. It includes a new display area in DDE that shows the LotusScript.doc content for the currently selected design element.

    Here is the public abstract and the download link for the plugin. Of course, we highly recommend that you get a subscription for THE VIEW if you're not a subscriber yet.


    Add LSDoc Support to Domino Designer on Eclipse with Custom Plug-ins

    Improve, accelerate, and streamline the Domino application development process by adding custom Eclipse extensions to Domino Designer on Eclipse (DDE). Find out how to add a handy development tool - LotusScript documentation support - to DDE and learn techniques and tricks that you can reuse for your own plug-in development.
    Moving IBM Lotus Domino Designer to the Eclipse platform has opened a new world of extensibility and customizability opportunities to developers. No longer restricted to using error-prone C add-in development to add features to Designer, you can now write Eclipse plug-ins for Domino Designer on Eclipse (DDE) 8.5 and above, taking advantage of a variety of Eclipse and DDE extension points to add functionality for both UI and back-end logic.

    Image:The View article: Add LSDoc Support to Domino Designer on Eclipse with Custom Plug-ins (download link included)

    Using Eclipse APIs, you can create a wide range of helpful tools, like the batch processing of design elements and one-click imports of frequently used script libraries. You can even customize Designer’s user interface - for example, add your own design element properties to the property panel (like the width and height in pixels of image resources).

    We’ll provide a useful example of using Eclipse APIs to enhance DDE as we take you through the steps for integrating LotusScript doc (LSDoc) support into DDE. LSDoc is a very popular development tool created by Mikkel Heisterberg that generates well-formatted code documentation for LotusScript, similar to Javadoc for the Java language. Version 2 of LSDoc has been completely rewritten in Java, so it integrates better into the Java-based Eclipse world - it is faster, scales better with large database designs, and it can be seamlessly used in Eclipse plug-ins.
    LSDoc generates HTML files for LotusScript documentation and stores them in a Notes database. However, it does not provide a mechanism to display those files. The files are served by the local Web preview of DDE, which requires Anonymous access to the LSDoc database; otherwise, the LSDoc database needs to be placed on a Domino server, which is not an option if you need to use LSDoc offline. In addition, there is no direct integration into Domino Designer yet. The documentation has to be opened in a separate browser window.

    We’ll show you how you can solve these two issues by creating a new DDE/Eclipse feature that carries its own Web server and displays the LSDoc content for the currently selected design element in a new visual area of DDE, an Eclipse ViewPart.

    Download link (source code and binary distribution):
    DDE_LSDoc_Plugin.zip

    Full article version (subscription required):
    Article on eview.com


    XPages series #9: How to debug an XPages application

    Karsten Lehmann  July 20 2010 09:49:53 AM
    Are you tired of using System.out.println's to track what the code of your XPages application is actually doing and why it is not working as expected? Life as a developer would be so much easier if there was a way to debug an XPages app while it is running.
    Well, at least for code written in Java there is a solution.

    Before we start, let me summarize which other options you have as an XPages developer to get runtime information about an application:

    Writing log messages to the console or a log file/database

    Of course you can manually collect the necessary information about the application state and write it to a log.  For client-side JavaScript logging, Firebug and console.log are your friends.
    On the server-side, you can use System.out.println() in Java to write a message to the console. For server-side JavaScript, there is a command called _dump() that does the same. If you don't have your own private Domino server for development, you will then soon get a call from the administrator, because the server's log database is rapidly filled with funny log messages like "before method xyz", "after method xyz" or another popular syntax: "method xyz.1", "method xyz.2", "method xyz.3" to see whether specific lines in your code are executed or skipped for a certain set of input parameters (of course, we never do that! ;-) ).
    You should at least use some global debug switches to quickly enable/disable debugging. Otherwise, moving an application to production and removing all those debug prints when the app is ready for prime time can be a lot of work.

    To not stress the administrator too much, you should use more advanced variants of this technique that do not write to the console, but make use of a dedicated log database or send status messages via email to the developer.  The TaskJam template contains a SSJS library that generates log records for the popular OpenLog project of Julian Robichaux (Java classes to do the same are available as part of the project).
    Tommy Valand has written a helper function to send debug messages via email.

    Analyzing the XPages component tree

    For more advanced XPages applications, writing simple status messages to a log is often not enough. You need detailed information about how the XPage is stored in the server memory. For example, if your XPages contain dynamic elements like repeater controls that create part of the UI at runtime or - even more powerful - you generate the whole component tree on the fly in your code, it's very hard to find out why an application is behaving unexpectedly.
    The Medusa project of Nathan Freeman, Tim Tripcony and Colin Macdonald can help you in this case. In short, it provides a Firebug plugin that lets you examine the server-side component tree (see the screenshot section of the Medusa project page for more details), e.g. to check whether a link has any server-side event code attached at all.

    Debug library code outside of XPages/Lotus Notes

    When you write a lot of application code in Java, a smart approach is to make most of it work outside of an XPage or even outside of a Lotus Notes context. That way, you can easily debug your library code in Eclipse and you can even build test cases for test-driven development.
    Unfortunately, there is no easy approach for SSJS debugging. There might be a way to build your own runtime environment using a JavaScript engine like Rhino, but we haven't really invested much time in that area, because most of our SSJS code is just directly calling bean methods in Java.

    What is missing?

    Looks like we already have a lot of options for logging and debugging. We have more for logging than debugging though, and there is no way yet to watch Java code while it is being executed on the server. That's exactly what this article is about.

    Now why is this important? At first, you save a lot of time, because you don't have to blow up your code with dozens of println's to track a specific issue, and remove all of them again after the issue has been resolved.
    And if you need to know more about complex objects and data structures, it's pretty hard to serialize them and print all parts to the log. Finally, in case of memory profiling and searching for memory leaks, it's a lot easier to just set a breakpoint in the code and examine which Java objects are stored in the server memory than trying to dump all that information to a log, if possible at all.

    Requirements for debugging

    Well, to be able to debug Java code, the Java Virtual Machine that is running the code, must be running in debug mode. Pretty logic, isn't it? In addition, you need to have the source code of something that you would like to debug, on the one hand to define the breakpoint position and on the other hand, because the debugger has to show something to tell you what is being executed.

    The best solution

    Our first idea was: What if we could launch the Domino server as a target platform from Eclipse, just like we do with the Notes Client or Domino Designer (DDE)? Then we could bring the JVM in debug mode and it would stop when a breakpoint in the code is reached. That's a similar approach to working with the Eclipse EE development environment, where Eclipse launches an embedded Tomcat server with a servlet configuration.
    Unfortunately, we don't know (yet) how to do this, because the Domino server is a bit more than just a few Java classes.

    Our solution :-)

    But, as I said above, we do know how to launch the Notes Client from Eclipse (with installed Expeditor). And since the Lotus Notes Client is able to serve "XPages in the Client" since release 8.5.1, it should be possible to debug the executed Java code in an XPages app. And in fact, it really is.
    We tried it and it worked, but when you launch Notes from Expeditor, you have to choose between launching the Notes client or DDE. Both cannot run at the same time, which is bad if you want to make small adjustments to your XPages application.

    There is an even simpler solution that does not require installing the Expeditor toolkit: Eclipse Remote Debugging.

    Launching Lotus Notes with enabled Remote Debugging

    This technique was inspired by a blog article of Bob Balfe that he wrote back in 2008: Lotus Notes can be launched in a special mode that makes it possible to connect to a running Notes Client from Eclipse.
    You can find detailed setup instructions on Bob's blog. Unfortunately, the picture links are broken, but you should get the idea what you have to do make it work.

    The calling syntax for Lotus Notes from his blog entry has slightly changed since 2008. Here is the syntax that works for release 8.5.1 and (most probably) 8.5.2:

    C:\Program files\IBM\Lotus\Notes\framework\rcp\rcplauncher.exe -config notes -debug -console -vmargs -Xdbg:transport=dt_socket,suspend=n,server=y,address=8000 -Xss512k

    Please note how we specify the port (8000) at the end of the line. We need to use the same port when we now create a new debug configuration in Eclipse (we're using version 3.4.2):

    Image:XPages series #9: How to debug an XPages application
    Debug configuration for remote debugging of Lotus Notes

    While Lotus Notes is running in debug mode, we can now connect to its JVM from our Eclipse IDE.

    You should now add Java projects to Eclipse that contain the Java code that you execute in your XPages application and set a few breakpoints.
    When you add the Java projects, Eclipse might complain about unresolved dependencies to classes of Expeditor, Notes or DDE.
    Here is a collection of JARs that might be needed as part of the classpath (depending on your Notes configuration, you need to modify the version numbers).
    • C:\Program files\IBM\Lotus\Notes\jvm\lib\ext\Notes.jar
    • C:\Program files\IBM\Lotus\Notes\framework\shared\eclipse\plugins\com.ibm.designer.lib.jsf_8.5.1.20090926-0124\lib\jsf-api.jar
    • C:\Program files\IBM\Lotus\Notes\framework\shared\eclipse\plugins\com.ibm.xsp.core_8.5.0.20100318-1445\lwpd.xsp.core.jar
    • C:\Program files\IBM\Lotus\Notes\framework\shared\eclipse\plugins\com.ibm.xsp.designer_8.5.0.20090926-0124\lwpd.xsp.designer.jar
    • C:\Program files\IBM\Lotus\Notes\framework\shared\eclipse\plugins\com.ibm.xsp.domino_8.5.1.20100318-1445\lwpd.xsp.domino.jar
    • C:\Program files\IBM\Lotus\Notes\framework\shared\eclipse\plugins\com.ibm.xsp.extsn_8.5.1.20100318-1445\lwpd.xsp.extsn.jar

    Launching the XPages application
    To launch the application, you can either choose an XPage in the Notes launch settings of the database or create a Composite Application, e.g. with one component that either shows the XPage itself or a component created for the XPage. Regarding the latter: there is an article in this blog with a demo video from IBM how to do it.

    Image:XPages series #9: How to debug an XPages application
    Choosing an XPages as launch option

    Hijacking XPages
    For every XPage displayed in the Notes Client, the Client starts a new local HTTP server instance that will be running until you close the XPage tab. That server is running on a randomly chosen port number and the Notes client uses a unique ID in the URL to authenticate the browser:

    http://127.0.0.1:2711/xsp/path%5Cto%5Cdb.nsf/xpageName.xsp?SessionID=ID0-35c463d059feb800

    Ever read that URL from JavaScript (document.location.href) and tried to use it in the system browser? Works like a charm.

    So in case your XPages apps are not running well in the Notes Client, because its XPages viewer blocks popup dialogs or does not display things like rounded corners via CSS properly etc., you can also open that URL in any other browser. It will be served locally by the HTTP server instance of the running Lotus Notes client. The Notes Client acts like a Domino server (and you don't need to open up the ACL for anonymous access like you have to do for the XPages preview in DDE).

    To make the process of opening a running XPages application in the system's default browser a lot easier, we have developed a small helper Eclipse plugin that shows up as a new toolbar icon in the Notes Client:

    Image:XPages series #9: How to debug an XPages application
    Toolbar icon to launch an XPage in the system browser

    The code behind the toolbar action is actually very easy. It reads the currently displayed XPages url, strips a few query string parameters and calls an Eclipse method that opens the URL in the default browser.
    Here is a ZIP file with an update site and the source code:
    A word about security exceptions
    You might see ECL security exceptions, if you are using "restricted" operations in your Java code, for example such dangerous things like XML parsing. ;-). This issue is discussed in another block article.
    Remember that it's still the Notes Client that serves the XPages, although you are using them in the system browser.
    As a temporary workaround, this can be solved by appending the following code to the java policy file located in C:\Program files\IBM\Lotus\Notes\java.policy:

    grant {
          permission java.security.AllPermission;
    };


    This completely disables any security restriction that is active for XPages code (Eclipse plugins are not affected by the security manager anyway), so be careful with it!

    Summary
    The demonstrated approach is a workaround for debugging XPages backend Java code, for which there is no officially available solution from IBM yet. By launching the Lotus Notes client with enabled remote debugging, we were able to connect from an external Eclipse IDE and debug custom backend Java code of an XPages application.
    Hopefully, IBM will someday provide a better solution, for example by transforming the Domino server into a standard Eclipse target platform that can be directly launched from Eclipse.

    At Lotusphere 2010, IBM announced that XPages in the upcoming Lotus Notes release 8.5.2 can be extended with custom OSGi/Eclipse plugins, e.g .in order to split up the business logic of a large enterprise application into small extensible modules.
    With some slight modifications, the demonstrated approach should also work in that scenario, but running a Domino server directly from Eclipse would further speed up the process of developing, deploying and testing code.


    Fast Notes view reading via C API Part 2: How to read views 99.7% faster than Notes.jar

    Karsten Lehmann  April 25 2010 11:52:56 PM
    This is a follow-up article to the first one about using the C API to read Notes view data instead of the Notes Java API provided by the Notes.jar file.

    Disclaimer
    You will see some incredible numbers in this article. Be sure, that we double checked them. This is no fake, although it looks like one. :-)

    Testing our approach on a server
    In the first article, we compared the execution times of the C code with the Notes.jar performance in a test case of reading 15.000 view entries from a local database. The result was 0.93 seconds for the C version and 2.8 seconds for the Java API. Pretty nice. That's a third of the execution time of Notes.jar, but we discussed that this may only make sense in cases where you really have a lot to read, e.g. several thousands of view entries, because there is some initialization overhead for creating a second Notes session and opening the database and view.

    So far, we only had done tests on the local machine and we were curious how well our code would work on a server database.
    Our test server is one of our development machines, which is hosted at an internet service provider and has a 100 mbit connection to the internet. Our home office internet connection speed is 15224 kbit/s downstream and 1164 kbit/s upstream.

    Reading all the view entries using Notes.jar gives us a good opportunity to look for some coffee. It takes 856735 ms, which is more than 14 minutes. There is no passthru server in between. The results were even slower when we were testing with a passthru server and a 1,5 mbit server connection.

    Our code looks like this:

            Session session=NotesFactory.createSession();
            Database db=session.getDatabase(serverName, dbPath);
            View v=db.getView(viewName);
            v.setAutoUpdate(false);
                           
            ViewEntryCollection entryCol=v.getAllEntries();
            ViewEntry entry=entryCol.getFirstEntry();
            while (entry!=null) {
                    if (entry.isValid()) {
                            Vector colValues=entry.getColumnValues();
                            //
                            //... code to dump the values to stdout
                            //
                    }
                    ViewEntry nextEntry=entryCol.getNextEntry();
                    entry.recycle();
                    entry=nextEntry;
            }
            session.recycle();


    So let's see how long our C approach takes... With the implementation of our first article, it takes 433337 ms, which is half the time - 7 minutes. Not bad, but still enough time for coffee.

    Reading more than one view entry at a time
    We were really surprised when we saw that result. We had expected that IBM might have added some caching technologies to read more than one view entry at a time, to optimize throughput on the slow network connection. But our C code was still a lot faster than their approach, and it only read one entry, reported it to our Java code via JNI and then it read the next one.

    But there was still some room for improvement in our solution.
    The C API function NIFReadEntries that we are using to read the data has a parameter to tell the API how many rows should be returned, as long as the provided buffer size is sufficient (we let Notes choose the buffer size for now). Until now, we were using a fixed value of 1. In the next version, this parameter is configurable.

    No time for coffee anymore :-)
    So here are the results, all for reading 15.000 view entries via the C API on a server database with different NIFReadEntries parameter values.
    Again, this is no fake. The numbers are absolutely reproducible:

    Maximum entries to read in NIFReadEntries Duration
    1 433337 ms
    10 44801 ms
    100 5960 ms
    1000 2552 ms


    We are down from 7 minutes to 2,5 seconds just by changing one single parameter in the NIFReadEntries call!

    Performance gain for local environment
    Reading more than one line at a time also speeds up the already fast local access times:

    Maximum entries to read in NIFReadEntries Duration
    1 968 ms
    10 606 ms
    100 587 ms
    1000 573 ms


    Reducing CPU load
    We did some tests to search for memory leaks in our code, in which we read the view about 1000 times. We found out that the CPU load can be reduced from 50% to 5-8% just by doing a Thread.sleep(1) every 200 rows in the Java code. This increased the execution time from 0,5s to 1s.

    Conclusion
    We could not believe our eyes when we saw those results. How on earth can reading a view be 99,7% (335 times) faster using C instead of Notes.jar? 14 minutes used for ECL checks and synchronize blocks? That's impossible.


    Fast Notes view reading via C API: A comparison C vs. Notes.jar

    Karsten Lehmann  March 31 2010 10:09:36 PM
    Bad day for a blog posting - this is no April fool's joke. :-)

    About 1,5 weeks ago, Nathan Freeman wrote a blog posting about the hidden NAPI plugin in Lotus Notes 8.5.1 that IBM uses to speed up the XPages framework. NAPI is an unsupported and incomplete set of Java classes that use JNI technology (Java Native Interface) to leverage functions of the Notes C API, for example to read data from a Notes view.

    According to Nathan's speed race video, the NAPI classes are much faster than using the classic Notes Java API inside the Notes.jar archive. To read 15.000 view entries, NAPI takes 1 second where Notes.jar is running for 6 seconds - a pretty impressive result.

    Last week, inspired by his comparison, we decided to develop our own C/JNI code. Of course, we like nothing more than writing C and it was a question of honour not to use IBM's NAPI plugin. :-)

    No, just kidding. Our use case was a bit different. NAPI is an Eclipse plugin, but we needed a solution that also runs in standalone Java applications.

    A few days of fun with NIF'ty things like NIFOpenCollection, NIFGetCollectionData or NIFReadEntries later, we now have our own working solution.

    The result

    We took Nathans test database with 15.000 documents to measure the performance of the different solutions. Our test code is executed from the Eclipse IDE as a small standalone application, we did not build an Eclipse plugin for it yet.
    The view looks like this:

    Image:Fast Notes view reading via C API: A comparison C vs. Notes.jar

    Three columns with text, one hidden sort column with the severity as number.

    Traversing the view and reading all column values using Notes.jar takes 2.8 seconds on our desktop test machine (Intel Core2Duo, 3 GHz, 4 GB RAM. WinXP VM in Vista)
    Please note that our test code is running exclusively in the JVM. This may explain the gap to Nathan's 6 seconds, his four test cases run in parallel which probably slows down I/O throughput, causes synchronization losses in the API and splits the CPU power.

    Speed of our C/JNI solution

    For the same scenario, the C/JNI approach only takes 0.93 seconds. You can even save more time by reducing the columns to be read. In contrast to Notes.jar, where you just have ViewEntry.getColumnValues(), which decodes all columns in a row, by using the C API you have to decode each column separately (e.g. to convert Notes LMBCS strings to Java's Unicode format).
    For example, if you decide to only decode one column, let's say the last one, the duration drops to 0,8 seconds. If you are just interested in the sort order of documents, you might only read the Note ID and skip the column decoding, which results in 0,7 seconds.

    Drawbacks

    0,93 seconds instead of 2,8 sounds pretty dramatic, but we need to keep in mind that we are not reading 10 or 100 view entries, but 15.000. So for normal lookup operations, this solution is probably an overkill. Especially because in a hybrid scenario (where most operations are done in Notes.jar, but view reading in C/JNI) we need to create a second session and may open the database and view twice, which obviously consumes some time.

    However, it looks like there is a good use case for the JNI approach in scenarios where a lot of processes access Notes data in parallel, for example on a Domino web server or in the Lotus Notes Standard Client with a lot of plugins that use Notes APIs.

    In those cases, Notes.jar turns out to be a performance bottleneck, because it does not directly wrap the C API functions, but is based on the "Lotus Software Extension Backend (LSXBE)", which does not handle multithreading very well from a performance perspective.

    Image:Fast Notes view reading via C API: A comparison C vs. Notes.jar

    Click here to read the second article about C API vs. Notes.jar - how to speed up view reading by the factor 335.

    LS10/EC10 session sample #2: Adding custom properties to DDE design elements

    Karsten Lehmann  March 11 2010 06:00:51 PM
    Sample 2 of our Lotusphere and Entwickercamp sessions is an add-on for Domino Designer on Eclipse.
    (I changed the order of the samples, because we need to work on a few others before we can publish them)

    As a long time web developer for the Notes/Domino platform, I have always missed one Designer feature a lot: There was obviously no easy way to get the pixel dimensions of image resources.
    My workaround was to extract the image to disk, open it in an image viewer and write down the width and height. A real pain.

    But now, that Domino Designer is based on the Eclipse platform, things have changed. Developers don't have to wait any more for IBM to implement a specific new feature. They can just create they own Designer add-ons!

    By leveraging the Eclipse APIs and new Domino Designer extensibility APIs we were able to build a small helper plugin, that hooks directly into the properties pane of DDE:

    Image:LS10/EC10 session sample #2: Adding custom properties to DDE design elements

    There are no methods in the DDE API to add such a section. It's basically an API that lets you convert the standard Eclipse selection into Designer specific classes. It offers some basic set/get methods for design elements and refresh methods to notify DDE that the design has been changed, e.g. by a DXL import using the backend Notes classes.

    But fortunately, IBM built DDE right on top of Eclipse and made use of standard Eclipse property panels for the design properties.
    Those panels can be extended by plugins with the following XML code:

    < extension point="org.eclipse.ui.views.properties.tabbed.propertySections" >
            < propertySections contributorId="com.ibm.designer.domino.navigator.panels" >
                    < propertySection
                            afterSection="com.ibm.designer.domino.navigator.panels.image.basic"
                            enablesFor="1"
                            class="com.mindoo.dde.imageproperties.WebImageSizeSection"
                            filter="com.mindoo.dde.imageproperties.ImagePropFilter"
                            id="com.ibm.designer.domino.navigator.panels.image.websize"
                            tab="com.ibm.designer.domino.navigator.panels.file.basic" / >
            < /propertySections >
    < /extension >


    It adds a custom section to an existing property panel. In this case, we are adding it to the "basics" panel and use a filter to hide it if no image resource is selected:

    package com.mindoo.dde.imageproperties;

    import org.eclipse.core.resources.IResource;
    import org.eclipse.jface.viewers.IFilter;

    import com.ibm.designer.domino.ide.resources.extensions.DesignerDesignElement;
    import com.ibm.designer.domino.ui.commons.extensions.DesignerResource;

    public class ImagePropFilter implements IFilter {
            public boolean select(Object paramObject) {
                    if (paramObject instanceof IResource) {
                            IResource resource=(IResource) paramObject;
                            DesignerDesignElement designElement=DesignerResource.getDesignElement(resource);
                            if (designElement!=null) {
                                    String deType=designElement.getDesignElementType();
                                    if (DesignerResource.TYPE_IMAGE.equals(deType))
                                            return true;
                            }
                    }
                    return false;
            }
    }


    When the selected image changes, the implementation class schedules a background job that grabs the DXL content of the image's design element. It converts the base64 encoded DXL content to a byte stream, uses Eclipse API methods to load the image, reads the width and height and displays them in the specific fields of the "Image size in px" area.
    Since we are doing this in a background operation, the DDE UI is still responsive.

    If you are asking yourself where to get those internal section IDs from, I highly recommend you to take a look at the plugin.xml file of the DDE plugin "com.ibm.designer.domino.navigator" in the "framework/shared subfolder" of your Notes program directory. :-)

    Finally, here is the plugin source code and an update site to install from:


    Entwickercamp 2010: our slides about add-ons for Notes Client and Domino Designer 8.5.1

    Karsten Lehmann  March 11 2010 12:42:31 PM
    As Julian Buss and Ulrich Krause already blogged, Entwicklercamp 2010 (developer camp), taking place this week from Monday to Wednesday, was a really well organized conference.
    It was great to meet with other developers and business partners and there were a lot of high quality sessions, mainly focused on XPages for web and Notes Client and Java/JavaScript development. Good to see that more and more developers and end users get interested in the new possibilities.

    Thanks to Rudi Knegt and his team for all their work organizing the event!

    This blog posting contains the slides of my session about add-on development for Notes Client/Domino Designer, leveraging new Java APIs of Notes/Domino 8.5.1.

    Actually, I did not only present the session once. I did three full session runs, one on Monday and two on Tuesday, because two Entwicklercamp participants had a conflict with other sessions, but were highly interested in the topic. So we had two additional one-on-one presentations including the whole demo show. The feedback for all three sessions was very positive. They even changed the room for the session (track 2 instead of track 4), because there were a lot more reservations for the session than expected.

    Fortunately, I had more time to present than at Lotusphere in Orlando (90 minutes instead of only 60), so I could present all of the 10+x demos that we had developed. In Orlando, we had to skip a few of them.
    The demos will be published one by one here in the blog. The first one is already posted: it's the bookmark tools plugin that adds context menus to the client's Open List.

    So here are the slides in German language:

    Image:Entwickercamp 2010: our slides about add-ons for Notes Client and Domino Designer 8.5.1



    LS10/EC10 session sample #1: Notes Bookmark tools

    Karsten Lehmann  January 30 2010 03:43:12 PM
    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/EC10 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/EC10 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/EC10 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  January 28 2010 07:30:23 AM
    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  January 25 2010 12:41:24 AM
    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  January 20 2010 06:26:26 AM
    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).