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…

2 thoughts on “Lotusphere 2006: Talking to the developers’bout the missing NotesDocmentCollection constructor and extensions to LotusScript”

  1. I just have a standard phrase in all my code…

    set myDocCollection = anyOldView.GetAllDocumentsByKey(“AintNoDocLikeThis”) ‘ I mean, if you’re really paranoid that you’ll ever actually get a document back, just think up something weirder…

    Usually I do use some view I’m about to work with anyway, in order not to get any overhead such as a suprise re-index.

Comments are closed.