Skip to content

Latest commit

Β 

History

History
62 lines (45 loc) Β· 3.15 KB

DesignPatterns.md

File metadata and controls

62 lines (45 loc) Β· 3.15 KB

Design Patterns


Design patterns are standard solutions to common problems in software design. They represent best practices, providing a way to structure code in a way that's reusable, maintainable, and understandable. Patterns can be classified into three types: creational (for object creation), structural (for object relationships), and behavioral (for object interactions and responsibility distribution).


Before you begin studying design patterns

Programming Basics & OOP

SOLID principle

Gamma categorization


Important The "Gamma categorization" refers to the classification of design patterns proposed in the book "Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma and others. It categorizes design patterns into three types:

  • Creational Patterns
    • Deal with the creation (construction) of objects
    • Explicit (constructor) vs. implicit (DI, reflection, etc.)
    • Wholesale (single statement) vs. piecewise (step-by-step)
  • Structural Patterns
    • Concerned with the structure (e.g., class members)
    • Many patterns are wrappers that mimic the underlying class’ interface
    • Stress the importance of good API design
  • Behavioral Patterns
    • They are all different; no central theme

Patterns

Creational Structural Behavioral
πŸ› οΈ Builder πŸ”Œ Adapter πŸ”— Chain of Responsibility
🏭 Factory πŸŒ‰ Bridge πŸ”˜ Command
🧬 Prototype 🌳 Composite πŸ“– Interpreter
πŸ” Singleton 🎨 Decorator πŸ”„ Iterator
πŸšͺ FaΓ§ade 🀝 Mediator
πŸƒ Flyweight πŸ“¦ Memento
πŸ•΅οΈ Proxy 0️⃣ Null Object
πŸ‘οΈ Observer
πŸ”„ State
πŸ’‘ Strategy
πŸ“œ Template Method
🚢 Visitor

GPT4 was used to generate explanations.

Examples from the course:

Design Patterns in C# and .NET: Learn Solutions to Common Problems

Found on rutracker.org