Tag:
11 posts found
Interpreter Pattern: Defining a Grammar and Interpreting Language Rules
Some problems require you to evaluate or process sentences, expressions, or commands that follow a particular grammar or set of rules.
By Misbahul Munir
Visitor Pattern: Separating Operations from the Objects They Work On
Sometimes you want to **perform operations on objects of different types** without changing those object classes.
By Misbahul Munir
Template Method Pattern: Defining the Steps, Letting Subclasses Fill in the Details
Sometimes you have an **algorithm with a fixed structure**, but certain steps of the process need to be defined or customized by subclasses.
By Misbahul Munir
Iterator Pattern: Sequentially Accessing Elements Without Exposing the Structure
Sometimes you need to **traverse** a collection (like a list, tree, or database results) without exposing its underlying representation.
By Misbahul Munir
State Pattern: Changing Behavior When State Changes
In software, objects often behave differently depending on their current situation or **state**.
By Misbahul Munir
Memento Pattern: Saving and Restoring Object State
When building software, sometimes we need the ability to “travel back in time.” Whether it’s undoing the last user action, reverting a configuration change, or ...
By Misbahul Munir
Mediator Pattern: Centralizing Communication Between Components
In many backend systems, different modules or services need to talk to each other.
By Misbahul Munir
Chain of Responsibility Pattern: Passing the Request Along the Chain
Sometimes in backend systems, a request might have **multiple possible handlers**, and we don’t want the sender to know which one will actually process it.
By Misbahul Munir
Command Pattern: Turning Requests into Reusable Objects
In the world of backend systems, requests to perform actions are everywhere — from executing a database migration, to scheduling a background job, to triggering...
By Misbahul Munir
Observer Pattern: Keeping Everyone in the Loop
Welcome to the continuation of our **Design Pattern Series**. Having explored **Creational** and **Structural** patterns, we now dive into the **Behavioral** ca...
By Misbahul Munir