Proxy Design Pattern in Java

In the video below, we take a closer look at the Proxy Design Pattern in Java. This video tutorial includes an introduction, real-time examples, a class/sequence diagram, and implementation. Let's get started!

Mediator Design Pattern in Java [Video]

In the video below, we take a closer look at the mediator design pattern in Java. Including an introduction, real-time examples, class diagram, and implementation, this tutorial will help you dive into the topic. Let's get started!

Interpreter Design Pattern in Java

In the video below, we take a closer look at the Interpreter Design pattern in Java. This tutorial includes an introduction, real-time examples, a class diagram, and implementation. Let's get started!

State Design Pattern in Java

State Design Pattern in Java is a software design pattern that allows an object to change its behavior when the internal state of that object changes. The state design pattern is generally used in cases where an object depends on its state and its behavior must be changed during run time depending on its internal state. The state design pattern is one of the many behavioral design patterns and therefore characterizes control flow between objects that is difficult to follow at run time. State Encapsulation is an excellent way to manage change in software. In this article, we will discuss the key aspects of state design pattern motivation, describe what it is, mention the key participants used in implementing it and also use a code example to demonstrate its usage.

What is the State Design Pattern? (State Design Pattern Real World Example)

In computer networks, TCP (Transmission Control Protocol) is a standard that defines how a connection is established and maintained through which the applications can exchange data. A TCP connection object can be in the following states:

Design Patterns Demystified – Strategy Design Pattern

In this edition of our series of Design Patterns Demystified, we are going to discuss the strategy design pattern. So let us understand the why, what, how, and where of Strategy Design Pattern.

The Why

Let us first understand why we need this pattern. Imagine you are building an interface for vehicle simulator which has standard behaviors like startEngine(), stopEngine(), drive(), etc. for different types of vehicles, so you created a standard hierarchy of a Vehicle interface and an implementation class for Cars. This worked fine for a while, until you got a contract from an airline company that wants a behavior called fly() instead of drive() (because you don't "drive" planes, generally).