Design Patterns

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
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
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
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
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
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