Skip to content
Software design patterns implemented in various languages.
C++ Rust TypeScript CMake Shell Ruby Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs feat(template): add template pattern (#43) Aug 16, 2019
scripts fix(repo): remove spaces between readme pattern links (#29) Aug 12, 2019
src feat(template): add template pattern (#43) Aug 16, 2019
.clang-format feat(repo): initialize repo with singleton pattern Jul 6, 2019
.clang-tidy fix(repo): allow not catching exception in main (#40) Aug 14, 2019
.gitignore test(repo): add travis tests for verifying repository code (#2) Jul 6, 2019
.travis.yml refactor(repo): order travis tests by language (#14) Jul 7, 2019
CONTRIBUTING.md feat(pages): move to serving `docs` folder rather than new branch (#9) Jul 7, 2019
Cargo.lock feat(template): add template pattern (#43) Aug 16, 2019
Cargo.toml
LICENSE
Makefile feat(repo): initialize repo with singleton pattern Jul 6, 2019
README.md feat(template): add template pattern (#43) Aug 16, 2019
package.json feat(template): add template pattern (#43) Aug 16, 2019
tsconfig.json feat(reactor): add reactor pattern (#42) Aug 16, 2019
tslint.yaml refactor(all-patterns): prevent explicit `public` keyword on members (#… Aug 12, 2019
yarn.lock chore(repo): update deps (#21) Aug 11, 2019

README.md

Software Design Patterns

Build Status

This repository catalogs common software design patterns implemented in various langauge.

The catalog can be explored on GitHub starting at the entry point, or on the corresponding website.

It's easy to write your own implementation!

Cataloged Pattern Implementations

Repository Mechanics

+-- docs
|   +-- index.md
|   +-- pattern1.md
+-- pandoc
|   +-- style.css
+-- scripts
|   +-- ...
+-- src
    +-- pattern1
    |   +-- pattern1.cpp
    |   +-- pattern1.rs
    +-- MANIFEST.yaml

The pandoc and scripts directories contain assets for building the website and scripts for testing/deployment, respectively. The src directory contains all the pattern implementations in this repository.

  • pattern(1..N) (named differently) are directories with source code implementing the pattern that directory names. For an example, take a look at the Singleton directory.
  • MANIFEST.yaml describes metadata about each pattern in the catalog and is used to build the entire catalog with scripts/writemd.

The docs directory contains the catalog's Markdown files with embedded pattern implementations.

  • index.md is the catalog entry point, with information about all the patterns in the catalog.
  • pattern(1..N).md (named differently) are files containing example source code for a particular pattern. patternM.md contains snippets of all the source codes in patternM/.

To mirror the information on the GitHub repository with the information on the website, the following is performed:

  • On every commit, embedme is run, embedding the source code of each pattern implementation in that pattern's docs/pattern.md. This is then presented on GitHub.
  • On each successful build, the repo's CI converts the Markdown source into HTML and pushes it to the GitHub Pages branch.

Contributing

Do it! See CONTRIBUTING.md.

You can’t perform that action at this time.