Tag Archive

Prototype based development approach

Published on February 26, 2007 By Nits

 In my experience, usually as a developer you will never get clear cut project requirements, to an extent that there are no considerable requirements at all. Traditional approach is usually following waterfall model where requirements are captured upfront. Most of the time these requirements are not complete or adequate enough, which later results in extra [...]

Template based Factory Method

Published on January 9, 2007 By Nits

Factory method pattern is similar to Abstract factory, the major difference being that the former requires sub-classing to create the product objects where as the later does not require. There may be a problem scenario with Factory Method, as having a sub-class for each product may not be desirable. This may be over come by [...]

Killing a singleton

Published on January 8, 2007 By Nits

I am reading “Pattern Hatching” by John Vlissides (http://www.research.ibm.com/designpatterns/pubs/ph-jun96.txt). I have come across the Singleton Pattern. The way to use a SingletonDestroyer (SD) class to “KILL a Singleton instance” is interesting. In John’s approach, destructor is made protected so that the user is not allowed to delete the singleton instance explicitly, also as said Singleton [...]

Singletonitis

Published on December 17, 2006 By Nits

My colleagues say that I am infected from “Singletonitis”. It is an addiction to Singleton pattern. Singleton pattern allows only a single instance of a class with a global access. Now my addiction is not on its over use in code, but because of lot of preaching to my team mates about singletons… It may [...]