Lotusphere 2006: And then suddenly it’s all over…

It feels like waking up on New Years Day. I’m tired. Really tired. I blog this after the General Closing Session sitting alone in the lobby of the Dolphin with my laptop trying to get my head around the past couple of days, watching Lotusphere 2006 being packed into crates. It seems to intensify the feeling of emptyness.

It has been amazing. As a first time visitor, and Lotusphere being the first kind of these conferences I have attended, it has been overwhelming. So much new stuff, having met so many new people. Putting faces to blogs, talking to strangers at lunch sharing ideas and getting really energized by the commitment of IBM which really has come across. The distance from a developer from Denmark to Lotus has never been shorter.

Personally it has been nice meeting people I have only “met” via e-mail – none mentioned, none forgotten. Many very nice comments and interesting conversations. I even experienced a person coming up to me and thanking me for LotusScript.doc. Whow!

Thanks to you all and remember:

Yellow is the new black… ๐Ÿ˜‰

See you next year.

Lotusphere 2006: Not really enjoying the GURUpalooza!

For those who didn’t attend, the concept of the session is to have the presenters from the Best Practices track on stage and have them take questions from the audience. A good idea though I didn’t find it to be as fruitful as it could have been.

Only having an hour set aside for the session I found it unnecessary to spend time on questions that really should be asked during the “Ask the developers” session later in the afternoon. Another thing is that, although it underlines that Lotusphere is indeed a multi-lingual and global event, some of us (myself included), who doesn’t have English as their mother tounge, take a little longer to express what we mean. Because of this a lot of time was spent trying to simply express the question and make sure that all were on the same page.

From my perspective, as primarily as listener to the session, it would have been better to have the questions submitted beforehand. Then the GURU’s would have had the time to sort through the questions, find out who should answer it and make sure that time wasn’t spent on questions that really couldn’t be answered in that forum. I realize that it kinds of defies the point of the session but in the interest of getting the most questions answered I think it would help. Another option could be to have a daily GURUpalooza.

Just some thoughts…

The word of Sametime 7.5 and the AIM/Yahoo deals is spreading

To quote the article:

The deals with AOL and Yahoo are similar to deals Microsoft struck last year with the two IM service providers. The difference is Lotus does not plan to charge for the integration. Microsoft is charging customers to integrate its IM platform with those consumer networks.”

The highlighting was added by me.

Link to the complete article in Computerworld Australia: Lotus preps new IM gateway software by John Fontana.

My The VIEW article is of to the presses

Went to see if my editor at The VIEW (Ann Baker) was here at Lotusphere which she was so that was very nice to finally meet her in person. We have been exchanging e-mail for the last 6-7 months now so a face-to-face meeting was definately overdue. She was quite surprised to see how young I looked which is always nice to hear although I don’t consider myself young looking anymore… ๐Ÿ™‚

Ann told me that the next issue was in the presses which means it will be out to the subscribers soon. Very exciting.

I really hope they picked up the changes I added at the last read-through.

Lotusphere 2006: Talking to the developers’bout the missing NotesDocmentCollection constructor and extensions to LotusScript

In the lab I was kindly directed to James Cooper who is the guy in charge of the Lotus Domino backend objects at IBM and hence the guy to talk to about these things.

At present my solution to the missing default constructor is to always have a view I know to be empty view in my databases. I do this with a selection formula like “1=2” to make sure it is empty. Then to create a new documnet collection you do a GetAllDocumentsByKey-call on the view which of cause will return an empty collection. While the approach works and is a valid workaround it is messy and means that other developers must know why that stupid view is there in the first place.

From my perspective adding the possibility to use the New keyword would be the way to go.

James told me that they never really thought about it, which I find hard to believe, but I accept that. His basic problem would be how to create a compelling business case for it within IBM since a working aworkround exists. The performance penalty to the current workaround is probably also negiable which makes it even more difficult. Anyways he took it down as a feature request so we’ll see how it goes with that.

Now that I was there I also asked the LotusScript team about whether to expect expansions to the core LotusScript language with some built-in classes for collections (ArrayList, LinkedList, Set and a Map) and for proper regular expression support (no more “Like”). I am under the impression that both should be fairly easy to expose via a LSX since the functionality is probably already there somewhere under the covers. I know that it raises some questions in regard to the Set since you need some standard way to tell whether when I, the developer, consider two elements equal. This should be relatively easy when using the built-in classes or primitive datatypes but will be more difficult when using custom classes.

Maybe it’s time to introduce a common base class for custom LotusScript classes. Well I guess that is a whole new can of worms…

Lotusphere 2006: Talking with “DXL Dick” ’bout web services and DXL

This morning (Tuesday 24 January) I attended session “AD204: Power Programming: Examining and Manipulating IBM Lotus Domino Application Designs” to hear a little about how the presenters were using DXL in their applications. The session was quite nice and in the demos they used DXL a lot to get at the design elements and manipulate them on-the-fly. In the Q&A session afterwards I had the opportunity to ask them why it isn’t possible to get at the source code for web services using DXL. They didn’t know that you were unable to do this but they redirected me to Dick Annicchiorico who’s the guy in charge of all things DXL.

As an aside it turns out that Dick is known internally in IBM as “DXL Dick”.

Dick should be available over in the “Meet the developers lab” so I went there. Unfortunately he could confirm that it was indeed not possible to get at the source code due to some problems with the DXLImporter part so the functionality was dropped from the product. What is really unfortunate for me, and LotusScript.doc, is that he told me that it might not even make it into Hannover which is really a shame.

Seems like the C API approach will have to be the way to go… Bummer.

Lotusphere 2006: What’s up with the Lotusphere pen?

The Lotusphere pen I got when registrering doesn’t work which is a first since give-away pens usually are better than expensive pens. I have been borrowing other Lotusphere pens during the sessions but they also stink which is extremely fustrating when taking notes. What’s up with that?

Sametime 7.5 announcement

I was going to blog about Sametime 7.5 but I just saw a post on Ed Brills blog with some screenshots and where he lists some highlights of Sametime 7.5 so I wont spend the time.

However I think he forgot to mention one of the best features shown in the demo – a built in screencapture application that allows you to embed screencaptures directly into the chat. I can’t recall the number of times I have gone through taking a screenshot and saving it as a file before sending it off via Sametime. Totally cool.

Screenshots are available in Ed Brills blog.

Lotusphere 2006: Day -1 (Getting there)

Being 4 hours delayed out of Copenhagen I didn’t arrive in Orlando Airport until 2AM. Since it was so late I was assuming that I would have to find a rental car since the airport would be closed down for the night but no, no, no… The airport was alive and kicking and at the Disney Magical Express 7 people was waiting to service the three tired “Lotuspherians” arriving at that late hour. After 30 minutes by shuttle and after checking in I was up in my room at the All-Sports Resort. One tired Dane looking for a bed.

Getting to sleep was difficult but I guess I got a couple of hours.

Transparently handle NotesThreads for web applications using the Domino Java API

When using a local Session to Domino with the Java API you have to have an initialized NotesThread. This is automatically done for you in Notes but in standalone applications or in web applications you have to manage this yourself. A common solution is to use the static methods of the NotesThread class:

try {
   NotesThread.sinitThread();
   Session session = NotesFactory.createSession();
   System.out.println(session.getUserName());
} catch (NotesException e) {
   e.printStackTrace();
} finally {
   NotesThread.stermThread();
}

This approach isn’t really viable with web applications when using a modular approach since it may not be apparent where the first request to Domino is made (hence where the NotesThread should be initialized) and when the last request has been made (hence the NotesThread should be terminated). Using a servlet filter is an easy transparent way to solve this problem.

Note: Using servlet filters isn’t supported when using Domino as the servlet engine. To play around with servlet filters download the Tomcat (or similar) servlet engine.

For those not familiar with servlet filters it is simply a Java class implementing the javax.servlet.Filter interface and deployed using the web deployment descriptor (web.xml). Once deployed the filter becomes part of a filter chain and for each web request that matches the deployment pattern the filter is called. The filter then has the possibility of performing some tasks before, after or both before handing the request of to the next filter in the chain. This means that each request to the web application is fed through the chain of filters matching the request URL before reaching the core business component which is typically a servlet. A filter could also choose to completely handle a request hence simply avoid forwarding a request down the filter chain (useful for caching of dynamically generated content).

You can think of a servlet filter as a way to externalize functionality common to many requests and having a declarative way to deploy it. A common use for servlet filters is hence for caching or compression.

Performing a task just before and after a request is exactly what we want to achieve. The filter below initializes the NotesThread before the request is forward to the actual business code and terminates the NotesThread after the request.

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import lotus.domino.NotesThread;

/**
 * Servlet filter for making sure NotesThreads are initialized and
 * terminated correctly.
 *
 */
public class NotesThreadFilter implements Filter {

   public void init(FilterConfig config) throws ServletException {
   }

   public void destroy() {
   }


   public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
                                                        throws IOException, ServletException {
      // start thread
      NotesThread.stermThread();

      // do work from other filters
      chain.doFilter(req, res);

      // close thread
      NotesThread.stermThread();
   }

}

To deploy the filter you use the <filter /> and <filter-mapping /> tags of the web.xml. To apply the filter to all requests made in the deployed servlet context you simply specify an asterix (*) as the pattern:

<?xml version="1.0" encoding="iso-8859-1">
   <web-app>
   ...
   ...
   <filter>
      <filter-name>MyFilter</filter-name>
      <filter-class>NotesThreadFilter</filter-class>
   </filter>

   <filter-mapping>
      <filter-name>MyFilter</filter-name>
      <url-pattern>*</url-pattern>
   </filter-mapping>
</web-app>

Of cause you have to be aware that initializing a NotesThread comes at a price so you might want to think twice before simply applying the filter to all requests. You might only want to apply the filter to servlets or controllers you know will access Domino.

I have found that using the servlet filter approch for NotesThreads and the SessionFactory approach I described yesterday makes it much more fun and a lot easier to do Domino Java API development. By using the two approaches it is also easy to decide, maybe even at runtime, whether to use local or remote Sessions.