• Stars
    star
    274
  • Rank 150,274 (Top 3 %)
  • Language
    C++
  • Created over 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Design Patterns - Elements of Reusable Object-Oriented Software

Introduction

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

  1. http://st-www.cs.illinois.edu/users/patterns/DPBook/DPBook.html
  2. http://st-www.cs.illinois.edu/patterns/dpbook/Source.html

Unfortunately, these links no longer work. If anybody knows the new location of the 'official' source code for the book, please let me know!

The nice thing about the Design Patterns 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 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!

Building

Checkout the code into a Design-Patterns-GoF directory:

$ git checkout [email protected]:BartVandewoestyne/Design-Patterns-GoF.git

Then, at the same directory level of the Design-Patterns-GoF directory, create a build directory and change into it:

~$ mkdir build
~$ cd build

Now do an out-of-source build using CMake:

~/build$ cmake ../Design-Patterns-GoF/
~/build$ make

More Repositories

1

Effective-Modern-Cpp

Sample code for the Effective Modern C++ book by Scott Meyers.
C++
557
star
2

Cpp

Experiments with the C++ programming language.
C++
134
star
3

Effective-Cpp

Sample code for the Effective C++ book by Scott Meyers.
C++
50
star
4

Modern-Compiler-Implementation-in-C

An unfinished implementation of the Tiger compiler.
C
27
star
5

oaconvert

OpenAir to Polish Format, GPX and KML convertor.
C++
13
star
6

Cpp_Primer

Answers to exercises of the C++ Primer book.
C++
8
star
7

Qt

Experiments with Qt
C++
8
star
8

CppFundamentals

Notes, own solutions and model solutions for a 4-day 'C++ Fundamentals' course I took.
C++
4
star
9

How-Not-to-Program-in-Cpp

Solutions to exercises in the book "How Not to Program in C++" by Steve Oualline.
C++
3
star
10

OpenCV

Experiments with OpenCV.
C++
2
star
11

tpcds-benchmark

Repository containing my Hive implementation of the TPC-DS benchmark.
Shell
2
star
12

Cpp-GUI-Programming-with-Qt-4

My version of the sample code from the book 'C++ GUI Programming with Qt 4'.
C++
2
star
13

osswin

Free and Open Source Software for Windows
HTML
2
star
14

CppAdvanced

Exercises of a 4-day advanced C++ course I took.
C++
1
star
15

Effective-Qt

Guidelines for effective Qt programming
TeX
1
star
16

Computer-Graphics-Using-OpenGL

Example code and source code for the book 'Computer Graphics Using OpenGL, Second Edition' by F.S. Hill, Jr.
C++
1
star
17

qt_4_8_7_with_vs2017_patch

A patch to build Qt 4.8.7 with Visual Studio 2017
1
star
18

Design-Patterns

Everything related to Design Patterns.
C++
1
star
19

Software-Development

Best practices for software development
C++
1
star
20

BartVandewoestyne.github.io

Ruby
1
star
21

chip8

CHIP-8 emulator
C++
1
star
22

C

Experiments with the C programming language.
C
1
star
23

COVID-19

Stuff I could find about the Belgian modeling related to the COVID-19 pandemic
1
star