Design Patterns

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

Composite Design Pattern in Java

Composite pattern is one of the Structural design pattern. Composite design pattern is used when we have to represent a part-whole hierarchy. Composite Design Pattern ![composite pattern, composite design pattern](images/composite-design-pattern-in-java-section-1.png) When we need to create a structure in a way that the objects in the structure has to be treated the same way, we can […]

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

Bridge Design Pattern in Java

Today we will look into Bridge Design Pattern in java. When we have interface hierarchies in both interfaces as well as implementations, then bridge design pattern is used to decouple the interfaces from implementation and hiding the implementation details from the client programs. Bridge Design Pattern Just like [Adapter pattern](/community/tutorials/adapter-design-pattern-java "Adapter Design Pattern in Java […]

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

Template Method Design Pattern in Java

URL: https://www.progressiverobot.com/template-method-design-pattern-in-java/ Template Method is a behavioral design pattern. Template Method design pattern is used to create a method stub and deferring some of the steps of implementation to the subclasses. Template Method Design Pattern Template method defines the steps to execute an algorithm and it can provide default implementation that might be common for […]

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

Flyweight Design Pattern in Java

Today we will look into Flyweight design pattern. Flyweight Design Pattern According to GoF, flyweight design pattern intent is: > Use sharing to support large numbers of fine-grained objects efficiently Flyweight design pattern is a Structural design pattern like [Facade pattern](/community/tutorials/facade-design-pattern-in-java "Facade Pattern in Java – Example Tutorial"), [Adapter Pattern](/community/tutorials/adapter-design-pattern-java "Adapter Design Pattern in Java […]

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

State Design Pattern in Java

URL: https://www.progressiverobot.com/state-design-pattern-java/ State design pattern is one of the behavioral design pattern. State design pattern is used when an Object change its behavior based on its internal state. State Design Pattern ![state design pattern, state design pattern in java, state pattern](images/state-design-pattern-java-section-1.png) If we have to change the behavior of an object based on its state, […]

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

Visitor Design Pattern in Java

URL: https://www.progressiverobot.com/visitor-design-pattern-java/ Visitor Design Pattern is one of the behavioral design pattern. Visitor Design Pattern Visitor pattern is used when we have to perform an operation on a group of similar kind of Objects. With the help of visitor pattern, we can move the operational logic from the objects to another class. For example, think […]

Read more
Android MVVM Design Pattern — step-by-step Programming tutorial on Progressive Robot

Android MVVM Design Pattern

In this tutorial, we'll be discussing and implementing the Android MVVM Architectural Pattern in our Android Application. We've previously discussed the [Android MVP Pattern](/community/tutorials/android-mvp). Why do we need these patterns? Adding everything in a Single Activity or Fragment would lead to problems in testing and refactoring the code. Hence, the use of separation of code […]

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

Factory Design Pattern in Java

Welcome to the Factory Design Pattern in Java tutorial. Factory Pattern is one of the Creational Design pattern and it's widely used in JDK as well as frameworks like Spring and Struts. Factory Design Pattern ![factory design pattern, factory design pattern in java, factory pattern, factory method pattern, factory pattern example](images/factory-design-pattern-in-java-section-1.png) The factory design pattern […]

Read more
Java Singleton Design Pattern Best Practices with Examples — step-by-step Programming tutorial on Progressive Robot

Java Singleton Design Pattern Best Practices with Examples

URL: https://www.progressiverobot.com/java-singleton-design-pattern-best-practices-examples/ Introduction _Java Singleton Pattern_ is one of the _Gangs of Four Design patterns_ and comes in the _Creational Design Pattern_ category. From the definition, it seems to be a straightforward design pattern, but when it comes to implementation, it comes with a lot of concerns. In this article, we will learn about singleton […]

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

Facade Design Pattern in Java

Facade Design Pattern is one of the Structural design patterns (such as [Adapter pattern](/community/tutorials/adapter-design-pattern-java "Adapter Design Pattern in Java – Example Tutorial") and [Decorator pattern](/community/tutorials/decorator-design-pattern-in-java-example "Decorator Pattern in Java – Example Tutorial")). Facade design pattern is used to help client applications to easily interact with the system. Facade Design Pattern ![facade design pattern, facade pattern, […]

Read more
CHAT