gurpreetshanky / Design-Patterns-GoF

Working code for the Design Patterns book from the Gang of Four.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is my implementation of the Design Patterns from the book

  'Design Patterns: Elements of Reusable Object-Oriented Software'
  Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
  ISBN 0-201-63361-2
  Copyright 1995
  21th Printing, November 2000

The webpage and official 'code' for this book were previously available from


(TODO: link [1] and [2] no longer work.  Does anybody know the new location of
 the 'official' source code for the book?)

The nice thing about the book is that it is... well... not complete :-) To come
to a complete working implementation of all the Design Patterns presented in the
book, and be able to play with them, requires some extra coding.  The goal of
this project is to actually provide the missing pieces and come to something
that will compile and run cleanly.

On the following websites, I have found some more C++ code that helped me
complete everything:


And here are some interesting slides that give some more explanation:


A more modern C++11 approach using Boost libraries was given in a talk
by Tobias Darm given here:

An interview from 2009 with the GoF authors is given here:

A dependency analysis and refactoring of the Gang of Four examples can
be found at

Feel free to send me your comments, suggestions and improvements in the form
of a git pull request!


Working code for the Design Patterns book from the Gang of Four.


Language:C++ 92.0%Language:CMake 7.6%Language:C 0.4%