In the previous post I had said that it may not be a good idea to have static attributes in your class. The Singleton design pattern also uses a static attribute to hold the Singleton instance. Even though there are valid uses of Singletons, lately this pattern has come under considerable attack . Here is another page on the Portland Pattern Repository Wiki , that outlines a practical problem someone faced while using Singletons. Google has an open source tool to detect Singletons. They call it the Google Singleton Detector . They have identified 4 types of Singletons, namely: Singletons, Hingletons, Mingletons, and Fingletons. You can find definitions for all the funny _ingletons on their wiki , but for those of you too lazy to visit the wiki, I will quote them here: Singleton: A class for which there should only be one instance in the entire system at any given time. This program detects singletons which enforce their own singularity, which means they keep one static instance of the...
Write Awesome User Manuals and Tutorials for Software Products