1 minute
Contact me

Name: Visitor

Type: Behavioural

Use when you want to:

Add operations to an object without modifying the object.

From Wikipedia:

In object-oriented programming and software engineering, the visitor design pattern is a way of separating an algorithm from an object structure on which it ope...

1 minute
Contact me

Name: Observer

(Otherwise known as "pub-sub")

Type: Behavioural

Use when you want to:

Define a dependency between objects so that whenever an object changes its state, all its dependents are notified.

From Wikipedia:

The observer pattern is a software design pattern in which an object,...

0 minutes
Contact me

Name: Mediator

Type: Behavioural

Use when you want to:

Mediate two objects (colleagues) and how they communicate without the colleagues knowing about eachothers implementations.

From Wikipedia:

In software engineering, the mediator pattern defines an object that encapsulates how a set of...

1 minute
Contact me

Name: Memento

Type: Behavioural

Use when you want to:

Add undo functionality.

From Wikipedia:

The memento pattern is a software design pattern that provides the ability to restore an object to its previous state (undo via rollback).

Real World Example:

Take the example of a text...

1 minute
Contact me

Name: Iterator

Type: Behavioural

Use when you want to:

Access the elements of an object without exposing the underlying presentation.

From Wikipedia:

In object-oriented programming, the iterator pattern is a design pattern in which an iterator is used to traverse a container and access t...

1 minute
Contact me

Name: Command

Type: Behavioural

Use when you want to:

Encapsulate actions in objects. The key idea behind this pattern is to provide the means to decouple client from receiver.

From Wikipedia:

In object-oriented programming, the command pattern is a behavioral design pattern in which an...