Bridge Design Pattern

What is Bridge design pattern? The Bridge Design Pattern is used when there is one set of classes (abstraction) that define features and another set of classes (implementation) that provide the implementation for that features. You then ‘add’ a bridge by injecting the base of the implementation hierarchy to the base of the abstraction hierarchy. … Read more

Strategy Design Pattern

This tutorial looks at the Strategy Design Pattern which is defined as – “groups of encapsulated algorithms that can be used interchangeably”. It is one of the design patterns popularized in the Design Patterns book by ‘Gang of Four’. Strategy Design pattern is a behavioral pattern. We will look at various aspects of the Strategy … Read more

Builder Design Pattern

Observer Design pattern

In the earlier tutorials we have seen the factory method and the abstract factory pattern. In this tutorial we look at another creational pattern called the Builder Design pattern. The Builder Design pattern specifies a builder class that creates multiple objects in a step by step manner. The client uses the builder to build the … Read more

Composite Design Pattern

Observer Design pattern

The Composite Design pattern is a structural pattern that defines a way to access a group of objects through a single object. It can be though of as a tree structure where a node holds reference to its children. The main actors in these pattern are Node The Node defines an interface that each object … Read more

Facade Pattern

Observer Design pattern

What is Facade Pattern The Facade pattern is a structural pattern that provides an entry point to a subsystem of classes. It provides a simpler interface to one or more interfaces. The salient points of a facade pattern are : A facade hides the complexity of a subsystem by providing an interface that is easy … Read more

Decorator Design Pattern

Observer Design pattern

Decorator Design pattern provides a way to add additional functionality to an object without modifying it. The additional functionality is added to the object at runtime and it does not require extending the class. Decorators have the same interface as the object they are decorating. Their purpose is to provide additional features at runtime and … Read more

Singleton Pattern

Observer Design pattern

This is the last of the creational patterns. In the earlier tutorials we have seen the factory method, the abstract factory pattern, the builder pattern and the prototype pattern. In this tutorial we will look at the Singleton pattern. The singleton pattern ensures that only once instance of a class is created and the client … Read more