Design patterns – Part 4: Factory method pattern

Factory method pattern definition:

The Factory method pattern defines an interface for creating and objects, but lets subclasses to decide which class they will create.

Huh?

I will try to present this pattern on a simple example. Imagine you work in a company that sales software. However, this software is, due to different laws, different for each country/region it is sold in (in our case EU and USA). You have two types of software (Pro and Basic that differ by price and package). You will need to create a single store that will allow users to only buy products from their country. [Read the rest of this entry…]

Domino Linux startup script – Addon

An error has come to my attention. Linux startup script for domino does not work by default. Instead it returns an error in a form of: “tty is disabled during system start up”.

What you can do, if you have sufficient rights (otherwise, ask your admin to do it), is to add the following line into sudoers file:

Defaults:your_notes_user !requiretty

Replace your_notes_user with username that can run notes, save it and that is it.

How do you do that?

  1. Login to your linux machine
  2. In console type visudo and press enter
  3. Edit the file by pressing either i or a vi command
  4. Go to the end of the file and add above mentioned line
  5. Save the file using :wq

Installing Sametime Gateway 8

A long time ago, at work, we decided that since we have a working Sametime environment, we could top that and also install Sametime Gateway and thus connect our Sametime community to other IM communities like Yahoo and Google Talk. [Read the rest of this entry…]

Securing Web Services

Last week I wrote my first web service (yay!). I am not going to write about that, as process of creating web services is nicely described at IBM developerworks. But, back to my service. The service is used to do some work that only my consumer application should be able to do. However, due to nature of it’s use, it has to be available on public server. It was after I nearly completed it, when I became aware of this issue. [Read the rest of this entry…]

Design patterns – Part 3: Singleton pattern

The simplest way to describe singleton class is to look at the definition:

The Singleton Pattern ensures a class has only one instance, and provides a point of access to it.

So why would you need that? Well, there are many objects you only need one of in your application (e.g. Logging, text trimming, for loading strings from a view, etc.). It assures you that you only have one instance of the class and that no one can create another instance on its own. Thus, you need a global access point to deliver the handle to the class. [Read the rest of this entry…]

Lotus Developer 2008 Europe Report

Day 0, Check-in

The flight was OK, check-in without issues and registration to the conference was prompt, which scared the hell out of me. You know what they say. If everything goes right, something is bound to go terribly wrong.
Conference registration people were kind enough to give me shoulder bag with loads and loads of commercials, a ticket to Blackberry Bold draw and a conference guide, which was probably the most useful item. If you don’t count the bag that is.
Then, off to the city I was for some gift shopping. [Read the rest of this entry…]

Lotus Developer 2008 Europe conference

As every year, I am attending The View’s Lotus Developer 2008 Europe conference, which will be held in Amsterdam from November 11th till November 13th. This is the biggest Lotus Notes conference taking place in Europe and since it is just a couple of months prior to LotuSphere conference, I can again hope for some cutting edge tips & tricks prepared for LotuSphere event. I will definitely report back upon my return.

Domino Linux startup script

As mentioned last week, you need to write your own shell script to start and stop domino on system start-up/shutdown. There is a great draft of the script on SearchDomino site. I did some remodelling so that the script would start Notes with Java controller and would fit our system. The code is pasted below.
[Read the rest of this entry…]

Upgrading Domino running Sametime to 8.0.2 on Linux platform

One of the Achilles tendons for Domino thus far, has always been Linux release. There is not many users, not much of documentation, installers don’t always run without meddling with the code and you have to write your own code to start and stop Domino on system start/shut down. So why use Domino on Linux platform anyway? It is definitely cheaper, the system is more stable and based on my experience Domino requires less resources to run smoothly. [Read the rest of this entry…]

Design patterns – Part 2: Decorator pattern

For those, skilled in Java development, Decorator patterns are nothing new, as they are quite common in Java, i.e. FileInputStream with it’s decorator BufferedInputStream class. The definition says:

The Decorator Pattern attaches additional responsibilities to an object dynamically.

More theoretical background can be found on Wikipedia.
[Read the rest of this entry…]