Tag: java

The Proxy Design Pattern

The Proxy Design Pattern

Proxy means ‘in place of’, or ‘on behalf of’. These literal meanings of proxy directly explains Proxy Design Pattern. Proxies are also called surrogates, placeholders, handles, and wrappers. In a nutshell, a proxy “Controls and manage access to the object they are protecting” When to use this pattern? Proxy pattern is used when we need to…

Read More Read More

Singleton pattern: Design Patterns

Singleton pattern: Design Patterns

This is the most simple and clean Creational Design pattern. We usually have times in our architecture and design of software where we need to use an object of a class but require only a single instance of it across the software. This type of single instance of a class is used widely in various…

Read More Read More

Abstract Factory Pattern: Design Patterns

Abstract Factory Pattern: Design Patterns

This Creational Design Pattern also known as factory of factories provides one of the best ways to create an object in large projects. In Abstract Factory pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes. Each generated factory can give the objects as per the Factory pattern.…

Read More Read More

Factory Pattern: Design Patterns

Factory Pattern: Design Patterns

One of the most trusted and widely used Creational Design Pattern is the Factory pattern. It helps to solve the problem of having tight coupling with the client code by encapsulating the object creation logic in itself. This might sound confusing so let’s break this to simpler words. We usually have some architecture where we…

Read More Read More

Builder Pattern with a Twist: Design Patterns

Builder Pattern with a Twist: Design Patterns

Builder pattern as we see is one of the most powerful creational of design patterns of all times. It is used in many instances where factory pattern does not suffice the purpose. This pattern has many advantages over the factory and the abstract factory pattern. Yet I always thought there could be more with this…

Read More Read More

Builder Pattern: Design Patterns

Builder Pattern: Design Patterns

  I have always been in love with the Creational design pattern: The Builder pattern. There are various instances in software development where you encounter complex object generation that has certain mandatory values and some optional values. The builder pattern comes in handy and is the best fit for these circumstances. Why did we need…

Read More Read More