Mediator pattern

1. Usage In software engineering, the mediator pattern defines an object that encapsulates how a set of objects interact. This pattern is considered to be a behavioral pattern due to […]

Read More

Memento pattern

1. Usage Saves inner state of object in order to restore it in future. Usually implemented in Undo/Redo of Editors sometimes with Command Pattern. Memento in C++ implemented as Friend […]

Read More

Chain of responsibility pattern

1. Usage Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass […]

Read More

Decorator

1. Usage Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. [GoF, p175] Client-specified embellishment of a core object by recursively wrapping […]

Read More

Facade

1. Usage When sub-system very complex and has many subsystems it make sense to unify access to it by providing single interface called facade. Facade isolate subsystems from direct calls […]

Read More

Flyweight

1. Usage you need to use many objects lets put 1000-100000. They are similar and related. For example icons of folders and files in Windows. To allow them share similar […]

Read More

Motivation

10 things you need to overcome to be successful. Procrastination – Just remind yourself the more fear you feel about a specific task, the more certain you can be that […]

Read More

Composite

1. Usage Composite is composing tree like structures as single object(container), and let clients to go through such composed objects and regular objects uniformly. Qt Library has implicit support of […]

Read More

Bridge

1. Usage Kind of “2D Abstraction” (or by Rumbaugh “nested generalizations”) both on Interface(Window in example below) and on Implementation(WindowImp). So both Abstraction and Implementation should be extensible by sub-classing.Another […]

Read More

Proxy

1. Usage Proxy pattern in general is Wrapper. Sometimes its hard/impossible to modify real object. For client using Proxy object should be same like using real object as they share […]

Read More