Category Archives: Patterns

Prototype Pattern in Java

[Fuente:] Prototype pattern is one of the Creational Design pattern, so it provides a mechanism of object creation. Prototype pattern is used when the Object creation is a costly affair and requires a lot of time and resources and you have a similar object already existing. So this pattern provides a mechanism to copy the […]

Builder Design Pattern in Java

[Fuente:] Builder design pattern is a creational design pattern like Factory Pattern and Abstract Factory Pattern. This pattern was introduced to solve some of the problems with Factory and Abstract Factory design patterns when the Object contains a lot of attributes. There are three major issues with Factory and Abstract Factory design patterns when the Object contains a lot […]

Abstract Factory Design Pattern in Java

[Fuente:]   Abstract Factory is one of the Creational pattern and almost similar to Factory Pattern except the fact that its more like factory of factories. If you are familiar with factory design pattern in java, you will notice that we have a single Factory class that returns the different sub-classes based on the input provided and factory class […]

Factory Design Pattern

  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 is used when we have a super class with multiple sub-classes and based on input, we need to return one of the sub-class. This pattern take out the responsibility of instantiation […]

Java Singleton Design Pattern Best Practices with Examples

[Fuente :] Singleton 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 very simple design pattern but when it comes to implementation, it comes with a lot of implementation concerns. The implementation of Singleton pattern has always been a controversial topic among developers. […]

Java Design Patterns – Tutorial con ejemplos

[Fuente:] Los patrones de diseño son muy populares entre los programadores de software. Un patrón de diseño es una solución bien descrita a un problema común de software. Algunos de los beneficios de utilizar patrones de diseño son: Los patrones de diseño están ya definidos y proporcionados como estándares por la industria para resolver […]