Problems with the Singleton Design Pattern

Introduction The design pattern Singleton first came to the attention of the software development community at large as a result of its documentation in the book Design Patterns: Elements of Reusable Object-Oriented Software” by Erich Gamma, Richard Helm, Ralph Johnson  and John Vlissides, which I mentioned in my “A Brief Introduction to Software Patterns” article. Read more…

The Anti Patterns Misconception

I kicked off this Software Patterns category with A Brief Introduction to Software Patterns. The following is a short quote from that post which sums up, in a nutshell, what that post had to say: A pattern is basically a capturing of a problem (in context) together with a solution to that problem Another pattern Read more…

Double Dispatch Pattern

The Double Dispatch pattern is a design pattern used to leave a class hierarchy open to having extra operations added to it. Further, double dispatch allows the implementations of such added operations to be different according to the actual, or “concrete”, type of the class. In this article I will start with an example of Read more…

A Brief Introduction to Software Patterns

I’m pretty sure that the first contact most software developers at large have with patterns is through the well known book "Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson  and John Vlissides – the "Gang of Four" (GoF) as they became known. This book – containing twenty-four object oriented Read more…

The Difference Between Encapsulation and Abstraction

The difference between encapsulation and abstraction seems to trouble some people, which is something I find rather odd. While both are concepts important to object oriented design, and while both are complementary to one another, they are two different concepts. In this article I will explain briefly what encapsulation and abstraction are, and how they Read more…