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

1 minute
Contact me

Name: Decorator

Type: Structural

Use when you want to:

Change the behaviour of one object dynamically and transparently, without changing the class of objects.

From Wikipedia:

In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an...

1 minute
Contact me

Name: Composite

Type: Structural

Use when you want to:

Selectively treat a group of objects that are part of a hierarchy as "the same" when they are in fact different.

From Wikipedia:

In software engineering, the composite pattern is a partitioning design pattern. The composite pattern...

1 minute
Contact me

Name: Bridge

Type: Structural

Use when you want to:

Handle orthogonal ("Changing A does not change B") concerns separately. Think colors, shapes.

Variants

From Wikipedia:

The bridge pattern is a design pattern used in software engineering that is meant to "decouple an abstraction fro...

1 minute
Contact me

Name: Adapter

Type: Structural

Use when you want to:

Make interfaces compatable

Variants

From Wikipedia:

In software engineering, the adapter pattern is a software design pattern that allows the interface of an existing class to be used as another interface. It is often used to make...