Design patterns – Part 7: Template method pattern

In this article, I would like to present you a design pattern that is not so common, but for sure, I wish, that in the past I would have used it. It would certainly make my life much easier. So, what is this Template method pattern all about?

The Template Method Pattern defines the skeleton of a an algorithm in one method. Some steps are deferred to subclasses, which are allowed to alter certain algorithm steps without changing the skeleton of an algorithm.

[Read the rest of this entry…]

Design patterns – Part 6: Observer pattern

One of the most used patterns is also a pattern that hears by the name Observer. What does it do? Well, imagine you have a stock portfolio and you need to notify your investors every time the value of their stock changes. First, your investors need to subscribe to the stock they would like to be notified about. Next, whenever new stock value is published, subscribers are notified. Much like RSS subscription. But what about definition:

The Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependants are notified and updated automatically.

[Read the rest of this entry…]

Securing names.nsf content from the web

Database names.nsf on public servers usually contains all details about users, groups, server configurations. With R8 this content is now seen on the web by default. There are plenty of possibilities how to secure the data. The easiest one though is to check Don’t allow URL open on application properties. 

As always there is a catch. As ?Login web command still works on names.nsf, ?Logout doesn’t. However ?Logout works on any other database that allows URL open.

Problems with names.nsf refresh

At work, we experienced an interesting problem. We use public servers names.nsf to register new web users. However, a couple of months back, that suddenly stopped working. A person document was created, user was added to all required groups, but upon login, a user would obtain an error that he is not authorized to perform that operation. The only thing that did the trick was to restart domino server.

[Read the rest of this entry…]

Version control and bug tracking

In my years of developing software, I come to realize that what every software development department needs is:

  • some sort of IDE with a compiler
  • version control
  • and bug tracking.

Usually you get stuck with IDE with a compiler. Everything else is up to you. But how are things in Lotus Notes?
[Read the rest of this entry…]

Got sick :(…

… so there will be no post this week. Sorry.

Design patterns – Part 5: Adapter pattern

Another quite useful pattern is Adapter pattern. Adapters represent an interface between two different classes. For example imagine being a continental EU citizen travelling to UK. For you to plug in to UK power plug, you need an adapter that will take the interface your connector has and output the interface UK power plug demands. [Read the rest of this entry…]

Web Services on ND8 vs ND7

One would think, creating and running web services on ND8 should not be incompatible with ND7 process. Wrong. There are a few quite important differences when creating web services on ND8 instead of ND7.

  1. You can now create clients. The one we’ve all been waiting for since ND7 came out.
  2. Web services created/built on ND8 don’t work on ND7 anymore! So, keep in mind that if you are running web services on ND7, you shouldn’t upgrade your designer to release 8 just yet.
  3. You can now use Java libraries when creating web services in Java. You couldn’t in ND7.
  4. You can now have port class defined in a script library when creating web services using LotusScript. This was not possible in ND7.
  5. You can now return empty array. if you wanted to do this in ND7, you had to create a class, containing an array and then return object of that class.
  6. More SOAP error handling elements.

Happy New Year!

I do wish all of you a happy and successful New year 2009. May all your wishes come true and all your code work.

Oh, and you have probably noticed, there won’t be an article this week ;).

Adding content to Rich Text field in a document using QOA

I have found an interesting challenge last week. For some reason, I had to have a document on web that would show a computed table of products and there would be some content before and after. The trick however is, that we use some sort of CRM database for our web content and documents use one rich text item to store document content.

Now, I didn’t want to create another form or change the existing one and there was way to complicated to do a computed value in rich text for table display. And we already had a web QOA for this type of document. [Read the rest of this entry…]