Design Pattern UML Examples

Software design patterns are reusable solutions to commonly occurring problems within a given context in software design. This section offers UML diagrams for the known design patterns.

Observer Design Pattern (UML Diagrams)

Observer pattern describes the way how to notify multiple dependant entities about state change. The object in the Subject role contains a list of Observer objects, which are notified if any state change in the Subject occurs.

Mediator Design Pattern (UML Diagrams)

The Mediator is a behavioral design pattern. It describes interactions between objects. The use of a mediator solves the problem of the complexity of communication. The objects communicate through the mediator object instead of each other.

Iterator Design Pattern (UML Diagrams)

The Iteration design pattern describes how to iterate a collection so that the iteration algorithm is decoupled from the collection class.

Command Design Pattern (UML Diagrams)

The Command design pattern allows you to encapsulate an action into an object and call it later. The command is called by an invoker. The command object includes parameters needed for calling the associated action accessed from a receiver.

Chain of Responsibility Design Pattern (UML Diagrams)

Chain of responsibility is a design pattern that suggests how to handle a request using a series of processing objects where each processing object contains a logic to decide whether it processes the request itself or it passes it to another processing object.

Proxy Design Pattern (UML Diagrams)

A proxy works as an interface, a wrapper or a substitute to another object that adds additional behavior before and/or after requests which are forwarded to the target object (e.g. a proxy may provide caching, logging).

Composite Design Pattern (UML Class Diagram)

Composite pattern is a structural pattern that organizes objects into trees. The intention of this pattern is to treat all the parts (groups, leaves) of the hierarchy in the same way.

Bridge Design Pattern (UML Class Diagram)

Bridge is a design pattern which allows you to separate an abstraction from its implementation. It leads to a less complex code with separate class hierarchies. The abstraction actions are delegated to an Implementation object.

Builder Design Pattern (UML Class Diagram)

Builder pattern simplifies the creation of complex objects and unifies the creation process for different types of objects. The products created by a concrete builder may be subclasses of different product classes.

Decorator Design Pattern (UML Diagrams)

The decorator pattern is a design pattern that allows behavior to be added to an object, dynamically, without affecting the behavior of other objects from the same class.

Adapter Design Pattern (UML Class Diagram)

If you want to make existing code work with another existing code without modifying any of the existing interfaces you can use Adapter design pattern.