Go Design Pattern: Chain of Responsibility

    📚 Go Design Patterns 🎯Behavioral Pattern ← Command Pattern 📋 All Patterns Observer Pattern → What is Chain of Responsibility? The Chain of Responsibility pattern is a behavioral design pattern that allows you to pass requests along a chain of handlers. Each handler decides whether to process the request or pass it to the next handler in the chain. This pattern decouples the sender of a request from its receivers by giving multiple objects a chance to handle the request. ...

    January 15, 2025 · 13 min · Rafiul Alam

    Go Design Pattern: Iterator

    📚 Go Design Patterns 🎯Behavioral Pattern ← Observer Pattern 📋 All Patterns State Pattern → What is Iterator Pattern? The Iterator pattern provides a way to access elements of a collection sequentially without exposing the underlying representation. It’s like having a remote control for your TV - you don’t need to know how the channels are stored internally, you just press “next” to move through them. ...

    November 13, 2024 · 11 min · Rafiul Alam

    Go Design Pattern: Strategy

    📚 Go Design Patterns 🎯Behavioral Pattern ← Builder Pattern 📋 All Patterns Decorator Pattern → What is Strategy Pattern? The Strategy pattern is a behavioral design pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable. It lets you select algorithms at runtime without altering the code that uses them. Think of it like choosing different routes to reach the same destination - each route (strategy) gets you there, but some might be faster, cheaper, or more scenic. ...

    February 13, 2024 · 9 min · Rafiul Alam