List/Grid Tag Archives: Design Patterns

Builder Design pattern in Java
Builder design pattern in Java is a creational pattern i.e. used to create objects, similar to factory method design pattern which is also creational design pattern. Before ...

Chain of Responsibility Pattern in Java
Chain of Responsibility design pattern is needed when a few processors should exist for performing an operation and a particular order should be defined for those processors. Also the ...

Testing Abstract Classes and Template Method Pattern
From wikipedia “A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors ...

Solving a Producer-Consumer Problem in Java
The producer-consumer problem is one of the most frequently encountered problems when we attempt multi threaded programming. While not as challenging as some of the other problems ...

The Visitor Pattern Re-visited
The visitor pattern is one of the most overrated and yet underestimated patterns in object-oriented design. Overrated, because it is often chosen too quickly (possibly by an architecture ...

Implementing the State Machine Pattern as a Stream Processor
In my last blog, I said that I really thought that some of the Gang Of Four (GOF) patterns were becoming somewhat obsolete, and if not obsolete then certainly unpopular. In particular ...

Java EE Revisits Design Patterns: Observer
Aside from being implemented in many languages and many applications, Observer Pattern has been a part of Java since version 1.0. Observer Pattern is also a good implementation of Hollywood ...

The Strategy Pattern
In a recent blog on I received a comment from Wojciech Soczy?ski about how the “strategy” pattern can be used to enforce the Single Responsibility Principle (SRP) when using Tell ...

Java EE Revisits Design Patterns: Asynchronous
Although you may not find Asynchronous method calls listed as a design pattern, I find it worth to mention. So here comes the last post of my JavaEE Revisits Design Patterns series. ...

Concurrency Pattern: Producer and Consumer
In my career spanning 15 years, the problem of Producer and Consumer is one that I have come across only a few times. In most programming cases, what we are doing is performing functions ...

