Category Archives: Design Patterns

Core Java and JEE Design Patterns

Strategy Design Pattern and Single Responsibility and Open-Closed Principles

Strategy design pattern is widely implemented to achieve interchangeable algorithmic behavior at runtime. As we know strategy pattern uses aggregation or composition instead of inheritance. It is a behavioral design pattern. The behaviors are defined in separate interfaces and the encapsulating classes that implement this interface. Generally most of the SOLID principles can be identified… Read More »

Factory Design Patterns and Open-Closed Principle (OCP), the ‘O’ in SOLID

Factory Design patterns are Creational patterns and deals with how the objects are created. There are three design patterns, namely, Simple Factory, Factory Method and Abstract Factory design patterns. All these patterns hide the object creation process from the client and supply the objects without specifying the exact class of object that will be created.… Read More »