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. ...

<span title='2025-01-15 00:00:00 +0000 UTC'>January 15, 2025</span>&nbsp;·&nbsp;13 min&nbsp;·&nbsp;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. ...

<span title='2024-02-13 00:00:00 +0000 UTC'>February 13, 2024</span>&nbsp;·&nbsp;9 min&nbsp;·&nbsp;Rafiul Alam