Design Patterns Tutorial
A tutorial on GOF design patterns. This tutorial is for beginners who are going to learn design patterns for the first time. Each pattern is expalined with suitable examples.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Introduction. 1 Comment on Catalog of design patterns

The catalog of design patterns (Gang-of-Four patterns) contains 23 design patterns. They are listed below:

 

Abstract Factory

Provides an interface for creating families of related or dependent objects without specifying their concrete classes.

 

Adapter

Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.

 

Bridge

Decouple (separate) the abstraction from its implementation so that the two can vary independently.

 

Builder

Separate (hide) the construction process from its representation so that the same construction process can create different representations.

 

Chain of Responsibility

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 the request along the chain until an object handles it.

 

Command

Encapsulate a request as an object which allows us to parametrize the clients with different requests and support undoable operations.

 

Composite

Combine objects into tree structures to form part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

 

Decorator

Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub classing for extending functionality.

 

Façade

Provide a uniform interface for a set of interfaces in a subsystem. Façade defines a higher level interface to make the subsystem easier to use.

 

Factory Method

Defines an interface to create an object, but lets subclasses decide which class to instantiate. Factory Method lets a class differ instantiation to subclasses.

 

Flyweight

Use sharing to support large numbers of fine-grained objects efficiently.

 

Interpreter

Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.

 

Iterator

Provides a way to access the individual elements of an aggregate object without exposing its underlying representation.

 

Mediator

Define an object that encapsulates how a set of objects interact.

 

Memento

Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later.

 

Observer

Defines a one-to-many dependency between objects so that if one object changes its state, it will notify the change to all other objects and update automatically.

 

Prototype

Specifies the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.

 

Proxy

Provide a placeholder for another object to control access to it.

 

Singleton

Ensure a class has only one object and a global point of access to that object.

 

State

Allow an object to change its behavior when its internal state changes. The object will appear to change its class.

 

Strategy

Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

 

Template Method

Define the skeleton of an algorithm in an operation, deferring some steps to sub classes.

 

Visitor

Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Note: Do you have a question on this article or have a suggestion to make this article better? You can ask or suggest us by filling in the below form. After commenting, your comment will be held for moderation and will be published in 24-48 hrs.

1 Comment

You can follow any responses to this entry through the RSS 2.0 feed.

Very good info. Lucky me I found your blog by chance (stumbleupon).
I have saved as a favorite for later!

Leave a Reply

Your email address will not be published. Required fields are marked *

Drag To Verify