Skip to content

Latest commit

ย 

History

History
62 lines (45 loc) ยท 3.15 KB

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