Trying BlogDesk for posting …
-
Menu
-
Archives
- July 2011 (1)
- November 2009 (3)
- October 2009 (1)
- May 2009 (1)
- March 2008 (3)
-
Tags
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: [...]
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 [...]