Skip to content

This repository serves as an educational and reference resource for software design patterns. It demonstrates practical implementations across multiple programming languages, helping developers build reusable, maintainable, and scalable solutions.

Notifications You must be signed in to change notification settings

wael-jaber/design_patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns Examples Repository

Build

Welcome to the Design Patterns Examples repository.

This project documents and demonstrates classic software design patterns through practical, idiomatic implementations in multiple programming languages.
Each language implementation is self-contained and follows the conventions and tooling of its ecosystem.

The goal is clarity, correctness, and comparability — not framework abstraction or tooling experiments.


📊 Code Coverage

Language Coverage
Java Java Coverage
TypeScript TypeScript Coverage
Python Python Coverage
Go Go Coverage

Language Implementations

Each language has its own README with setup instructions, structure, and examples:


Repository Structure

design-patterns/
├── typescript/        # TypeScript implementations
├── java/              # Java implementations
├── python/            # Python implementations
├── go/                # Go implementations
├── Makefile           # Root orchestration Makefile
└── README.md

The root Makefile only orchestrates common tasks.
All language-specific logic lives inside each directory.


Supported Design Patterns

Creational Patterns

  • Singleton
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype

Structural Patterns

  • Adapter
  • Composite
  • Proxy
  • Decorator
  • Facade
  • Bridge

Behavioral Patterns

  • Observer
  • Strategy
  • Command
  • State
  • Mediator
  • Chain of Responsibility

How to Use

Prerequisites

Install the tooling for the language you want to explore:

  • TypeScript: Node.js + pnpm
  • Java: JDK 17+ and Maven
  • Python: Python 3.9+
  • Go: Go 1.22+

Each language directory can be used independently by following its README.


Common Commands (Root)

make install   # Install dependencies for all languages
make test      # Run all tests
make clean     # Clean build artifacts

Roadmap

  • Rust
    • Implement design patterns in Rust
    • Focus on ownership, borrowing, and concurrency trade-offs

Purpose

This repository exists to:

  • Document design pattern knowledge in a concrete, runnable form
  • Compare implementations across languages
  • Serve as a long-term reference
  • Favor correctness and clarity over abstraction

Feel free to explore, fork, or use this repository as a learning reference.

About

This repository serves as an educational and reference resource for software design patterns. It demonstrates practical implementations across multiple programming languages, helping developers build reusable, maintainable, and scalable solutions.

Topics

Resources

Stars

Watchers

Forks