Monthly Archives: November 2009

BlogDesk?

Trying BlogDesk for posting …

Singleton Design Pattern

Issue no. 3 on design patterns: The singleton pattern. Whenever we need a place to save and retrieve data throughout a script without using globals the singleton pattern comes in handy. It allows only one instance of itself. What seems like a drawback is quite useful: Wherever in your source you instantiate such an object: [...]

Parameterized Factory Desing Pattern

The parameterized factory design pattern is an extension to the factory design pattern as you might have guessed, but here we can make the factory create different objects depending on the parameter passed to the create-method. Imagine your application is supposed to connect to a MySQL-DB or to a PostgreSQL-DB. Instead of creating different objects [...]