Design Patterns

Decorator Design Pattern in Java Example — step-by-step Programming tutorial on Progressive Robot

Decorator Design Pattern in Java Example

Decorator design pattern is used to modify the functionality of an object at runtime. At the same time other instances of the same class will not be affected by this, so individual object gets the modified behavior. Decorator design pattern is one of the structural design pattern (such as [Adapter Pattern](/community/tutorials/adapter-design-pattern-java "Adapter Design Pattern in […]

Read more
Thread Safety in Java Singleton Classes — step-by-step Programming tutorial on Progressive Robot

Thread Safety in Java Singleton Classes

Singleton is one of the most widely used creational design pattern to restrict the object creation by applications. In real world applications, resources like Database connections or Enterprise Information Systems (EIS) are limited and should be used wisely to avoid any resource crunch. To achieve this, we can implement Singleton design pattern to create a wrapper class around the resource and limit the number of object created at runtime to one.

Read more
Chain of Responsibility Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Chain of Responsibility Design Pattern in Java

Chain of responsibility design pattern is one of the behavioral design pattern. Chain of Responsibility Design Pattern ![Chain of Responsibility Design Pattern, Chain of Responsibility Pattern, Chain of Responsibility Pattern Java, Chain of Responsibility](images/chain-of-responsibility-design-pattern-in-java-section-1.png) Chain of responsibility pattern is used to achieve loose coupling in software design where a request from client is passed to […]

Read more
Iterator Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Iterator Design Pattern in Java

URL: https://www.progressiverobot.com/iterator-design-pattern-java/ Iterator design pattern in one of the behavioral pattern. Iterator pattern is used to provide a standard way to traverse through a group of Objects. Iterator pattern is widely used in [Java Collection Framework](/community/tutorials/collections-in-java-tutorial "Java Collections Framework Tutorial"). Iterator interface provides methods for traversing through a collection. Iterator Design Pattern ![iterator design pattern](images/iterator-design-pattern-java-section-1.png) […]

Read more
Adapter Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Adapter Design Pattern in Java

Adapter design pattern is one of the structural design pattern and its used so that two unrelated interfaces can work together. The object that joins these unrelated interface is called an Adapter. Adapter Design Pattern ![adapter design pattern, adapter design pattern in java, adapter pattern, adapter pattern java example](images/adapter-design-pattern-java-section-1.png) One of the great real life […]

Read more
Java Dependency Injection - DI Design Pattern Example Tutorial — step-by-step Programming tutorial on Progressive Robot

Java Dependency Injection – DI Design Pattern Example Tutorial

URL: https://www.progressiverobot.com/java-dependency-injection-design-pattern-example-tutorial/ Java Dependency Injection design pattern allows us to remove the hard-coded dependencies and make our application loosely coupled, extendable and maintainable. We can implement dependency injection in java to move the dependency resolution from compile-time to runtime. Java Dependency Injection Java Dependency injection seems hard to grasp with theory, so we would take […]

Read more
Observer Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Observer Design Pattern in Java

URL: https://www.progressiverobot.com/observer-design-pattern-in-java/ Observer Pattern is one of the behavioral design pattern. Observer design pattern is useful when you are interested in the state of an object and want to get notified whenever there is any change. In observer pattern, the object that watch on the state of another object are called Observer and the object […]

Read more
Mediator Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Mediator Design Pattern in Java

URL: https://www.progressiverobot.com/mediator-design-pattern-java/ Mediator design pattern is one of the behavioral design pattern, so it deals with the behaviors of objects. Mediator design pattern is used to provide a centralized communication medium between different objects in a system. Mediator Design Pattern ![mediator pattern, mediator design pattern, mediator pattern java](images/mediator-design-pattern-java-section-1.png) According to GoF, mediator pattern intent is: […]

Read more
Abstract Factory Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Abstract Factory Design Pattern in Java

Welcome to Abstract Factory Design Pattern in java example. Abstract Factory design pattern is one of the Creational patterns. Abstract Factory pattern is almost similar to [Factory Pattern](/community/tutorials/factory-design-pattern-in-java) except the fact that its more like factory of factories. Abstract Factory ![abstract factory, abstract factory design pattern, abstract factory pattern](images/abstract-factory-design-pattern-in-java-section-1.png) If you are familiar with [factory […]

Read more
CHAT