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

1 minute
Contact me

Name: Proxy

Type: Structural

Use when you want to:

Represent the functionality of anoter class.

From Wikipedia:

A proxy, in its most general form, is a class functioning as an interface to something else. A proxy is a wrapper or agent object that is being called by the client to access t...

1 minute
Contact me

Name: Flyweight

Type: Structural

Use when you want to:

Avoid recomputing data that has previously been computed. (memoization).

From Wikipedia:

In computer programming, flyweight is a software design pattern. A flyweight is an object that minimizes memory use by sharing as much data as p...

1 minute
Contact me

Name: Facade

Type: Structural

Use when you want to:

Provide a simplified interface to a complex subsystem.

From Wikipedia:

A facade is an object that provides a simplified interface to a larger body of code, such as a class library.

Real World Example:

What do you do turn a compu...