/pragmatic-design-patterns

Design Patterns done in a Pragmatic way!

Primary LanguageJupyter NotebookMIT LicenseMIT

Pragmatic Design Patterns

Design Patterns done in a Pragmatic way!

Custom Badge MIT licensed GitHub Pages

Objectives

  1. OOP
  2. Creational Patterns
  3. Structural Patterns
  4. Behavioral Patterns

Cheat Sheet

OOP

  • S - Single Responsibility

  • O - Open-Closed - Open for Extension, but Closed for Modification

  • L - Liskov Substitution - Child Class should be able to stand for their parents

  • I - Interface Segregation - Many specific interface better than one do-it-all interface

  • D - Dependency Inversion - We should program towards interface not implementation

  • Interface

  • Null Pattern - Consider using the null pattern wherever possible, like in following cheatsheets

Creational Patterns - Deals with Object Creation

Structural Patterns - Deals with Relations between Objects

Behavioral Patterns - Deals with Object Interaction and Responsibility