# Design Patterns - Gang of Four (22 Patterns)

Complete reference for Gang of Four design patterns with detailed documentation covering:
- **Intent** - What the pattern does and why
- **Problem** - The real-world challenge it addresses
- **Solution** - The approach the pattern proposes
- **Structure** - Components and their relationships
- **Implementation Steps** - How to apply the pattern
- **Applicability** - When to use it
- **Pros and Cons** - Trade-offs
- **Relations with Other Patterns** - How it relates to other patterns

## 📂 Organization by Category

### Creational Patterns (5)
Object creation mechanisms that increase flexibility and reuse.

- [Factory Method](creational/factory-method.md)
- [Abstract Factory](creational/abstract-factory.md)
- [Builder](creational/builder.md)
- [Prototype](creational/prototype.md)
- [Singleton](creational/singleton.md)

### Structural Patterns (7)
Object composition mechanisms for larger structures.

- [Adapter](structural/adapter.md)
- [Bridge](structural/bridge.md)
- [Composite](structural/composite.md)
- [Decorator](structural/decorator.md)
- [Facade](structural/facade.md)
- [Flyweight](structural/flyweight.md)
- [Proxy](structural/proxy.md)

### Behavioral Patterns (10)
Algorithms and object responsibility assignment.

- [Chain of Responsibility](behavioral/chain-of-responsibility.md)
- [Command](behavioral/command.md)
- [Iterator](behavioral/iterator.md)
- [Mediator](behavioral/mediator.md)
- [Memento](behavioral/memento.md)
- [Observer](behavioral/observer.md)
- [State](behavioral/state.md)
- [Strategy](behavioral/strategy.md)
- [Template Method](behavioral/template-method.md)
- [Visitor](behavioral/visitor.md)

## 📖 How to Use

1. **Browse by Category** - Choose creational, structural, or behavioral
2. **Read Intent** - Start with the pattern's purpose
3. **Understand Problem** - See real-world examples
4. **Learn Solution** - Study the approach
5. **Study Structure** - Review class diagrams and relationships
6. **Practice Implementation** - Follow step-by-step implementation guide

## 🔗 Pattern Relationships

Patterns often relate to each other. Each pattern document includes "Relations with Other Patterns" section to help understand:
- Which patterns are alternatives
- Which patterns work well together
- How patterns can evolve into each other
