Stubs versus the proxy pattern

For my employer I’m currently writing a course of design patterns, which I will give this year to a group of my colleagues. Therefore I was looking at the various design patterns that could be interesting for the people to learn. When I prepare such a course, I try to think what kind of thinking errors the students could make. When you do this, you can deep out your story much more and anticipate on questions that can arise.

Read More…

Posted in Design patterns, Unit testing at January 20th, 2014. No Comments.

Singleton an anti-pattern?

The singleton pattern is a widely used design pattern, which allows us to have only one instance of a class. Although using a singleton can have its benefits, there also a number of drawbacks which should convince you to use singletons wisely. Due to the drawbacks of the singleton pattern, this pattern is also referred to as a anti-pattern. An anti-pattern is a design pattern, which is in some ways in-effective or has drawbacks.
Read More…
Posted in Design patterns at January 8th, 2014. No Comments.