Home » Tag Archives: Design Patterns

Tag Archives: Design Patterns

Abstract Factory or Factory Method?

software-development-2-logo

Today I would like to tell you about Factory Method Pattern and Abstract Factory Pattern. The purpose of the article is to help you recognize places where one of them should be used. What will we talk about? Those patterns are one of the Creational Patterns and as the name suggest their main responsibility is creating the objects. However, we ...

Read More »

Java Dynamic Proxy

java-logo

Proxy is a design pattern. We create and use proxy objects when we want to add or modify some functionality of an already existing class. The proxy object is used instead of the original one. Usually the proxy objects have the same methods as the original one and in Java proxy classes usually extend the original class. The proxy has a ...

Read More »

Java 8 Lambda Expression for Design Patterns – Strategy Design Pattern

java-logo

The strategy pattern defines a family of algorithms encapsulated in a driver class usually known as Context and enables the algorithms to be interchangeable. It makes the algorithms easily interchangeable, and provides mechanism to choose the appropriate algorithm at a particular time. The algorithms (strategies) are chosen at runtime either by a Client or by the Context. The Context class ...

Read More »

Decorator Design Pattern using lambdas

java-logo

With the advent of lambdas in Java we now have a new tool to better design our code. Of course the first step is using streams, method references and other neat features introduced in Java 8. Going forward I think the next step is to revisit the well established Design Patterns and see them through the functional programming lenses. For ...

Read More »

Factory Pattern

java-logo

The factory pattern is a creational design pattern whose intent is to provide an interface for creating families of related or dependent objects without specifying their concrete classes. The creational logic is encapsulated within the factory which either provides a method for its creation or delegates the creation of the object to a subclass. The client is not aware of ...

Read More »

Java 8 Lambda Expression for Design Patterns – Decorator Design Pattern

java-logo

The Decorator pattern (also known as Wrapper) allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class. It can be considered as an alternative to subclassing. We know that subclassing adds behavior at compile time and the change affects all instances of the original class. On ...

Read More »

Visitor Design Pattern

java-logo

This article is part of our Academy Course titled Java Design Patterns. In this course you will delve into a vast number of Design Patterns and see how those are implemented and utilized in Java. You will understand the reasons why patterns are so important and learn when and how to apply each one of them. Check it out here! ...

Read More »

Iterator Design Pattern

java-logo

This article is part of our Academy Course titled Java Design Patterns. In this course you will delve into a vast number of Design Patterns and see how those are implemented and utilized in Java. You will understand the reasons why patterns are so important and learn when and how to apply each one of them. Check it out here! ...

Read More »

Decorator Design Pattern

java-logo

This article is part of our Academy Course titled Java Design Patterns. In this course you will delve into a vast number of Design Patterns and see how those are implemented and utilized in Java. You will understand the reasons why patterns are so important and learn when and how to apply each one of them. Check it out here! ...

Read More »

Interpreter Design Pattern

java-logo

This article is part of our Academy Course titled Java Design Patterns. In this course you will delve into a vast number of Design Patterns and see how those are implemented and utilized in Java. You will understand the reasons why patterns are so important and learn when and how to apply each one of them. Check it out here! ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials