provided by: 
Originally published at Internet.comBefore you can be expected to get excited about patterns it will be helpful to tell you what they are and why you want to know about them.
Patterns are named solutions or strategies to problems that have already been solved. Patterns have names and descriptions that describe how to implement a particular pattern, and usually there is information that describes the benefits and consequences of using a specific pattern. Most importantly is that patterns are solutions to often sticky problems that someone with a substantial amount of experience has already solved in a clever way. If you know about the pattern then you can simply borrow. Knowing about patterns is what it would be like if Michael Jordan were able to tell you how to leap and all you had to do were follow his instructions. Unfortunately physical emulation takes a substantial amount of work and natural ability. Mental emulation requires a lot of effort, too, but perhaps less natural ability.
A pattern is a general solution to a category of problem. Instead of reinventing a solution all you have to do is learn the pattern and know when to apply it. Some patterns are easier to understand and use than others.
The pattern we are going to look at is the Singleton pattern. I actually learned to use it years ago before it was called a pattern. Ten years ago or so, using Singleton objects was just referred to as Singletons. (I originally read about this pattern in a book by James Coplien, "Advanced C++", or maybe it was one of Grady Booch's books. It is long enough ago that I forgot the source, but the pattern is useful enough that I use it all the time.)
What is the Singleton pattern?
...
Read article at Internet.com site