Adapter Design Pattern in Java

Reading Time: 4 minutes Description Adapter Design pattern is listed underneath the Structural patterns. As you understand from the name it is designated to act like an adapter. When you look for this pattern there are different descriptions and examples, however I find the below illustration very clear what the pattern stands for; As you study the illustration we

Mediator Design Patter in Java

Reading Time: 4 minutes Definition The Mediator Pattern falls into the Behavioral Pattern. In simple terms, there is centrally a mediator that handles communication between object in a loosely coupled way, thus objects shall not talk to each other directly. Furthermore, often developers get confused with the Observer pattern, and they seem pretty similar. However, we can break the

Builder Pattern in Java

Reading Time: 6 minutes The Builder pattern eliminates building the complexity of the target object as well as eases the construction by providing such methods that will assemble the object same as building a set of blocks. By implementing the Builder pattern, there won’t be any need of larger constructors, parameter objects or custom types. Furthermore, the Builder pattern

Proxy Design Pattern and Proxy Objects

Reading Time: 5 minutes Proxy Design Pattern This pattern is listed as a Structural pattern in the tree of Design Patterns by GoF. It is more focused on intercepting and delegating client request. Proxy Objects Proxy objects are not a separate concept of the Proxy Design pattern, but the outcome of it. I am separately handling this because it

Strategy Pattern

Reading Time: 1 minute This pattern is listed in Behavioral pattern which allows you to define sets of algorithms in the parent class which will be extended by sub classes in which all the given algorithms are interchangeable. The best way to observe this pattern is to study the below example. public abstract class Employee { public abstract int