Tag:
23 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
Flyweight Pattern: Saving Memory with Shared Objects
## What is the Flyweight Pattern?
By Misbahul Munir
Proxy Pattern: Controlling Access Like a Middleman
Sometimes, direct access to an object isn’t desirable or possible. You might want to add an **extra layer of control** — like validation, caching, lazy loading,...
By Misbahul Munir
Bridge Pattern: Decoupling Abstraction from Implementation
In complex systems, tight coupling between **abstractions and their implementations** can create rigidity. What if you want to vary both **what you do** and **h...
By Misbahul Munir
Composite Pattern: Treating Groups and Individuals the Same
In software design, complexity often arises not from individual parts but from how parts relate to each other — especially when **some parts contain other parts...
By Misbahul Munir
Facade Pattern: Simplifying Complex Systems
In the world of structural design patterns, the **Facade Pattern** stands out for its simplicity and power. It’s a pattern that promotes clean architecture by h...
By Misbahul Munir
Adapter Pattern: Making Incompatible Interfaces Work Together
After finishing the creational patterns, we now enter the world of **structural patterns** — which are all about **how classes and objects are composed** to for...
By Misbahul Munir
Prototype Pattern: Cloning Objects Like a Pro
We've reached the last creational pattern in this series! So far, we’ve explored Singleton, Factory, Abstract Factory, and Builder — each focused on **creating ...
By Misbahul Munir
Builder Pattern: Step-by-Step Object Construction
Welcome back to the design patterns series! So far, we’ve explored how to manage object creation using Singleton, Factory, and Abstract Factory. Today, we’ll co...
By Misbahul Munir
Abstract Factory Pattern: Factories Making Factories
So far, we’ve looked at Singleton, Factory, Strategy, and Decorator patterns—each solving specific design problems. Today, we’re zooming in on a creational patt...
By Misbahul Munir
Decorator Pattern: Adding Features Without Changing the Core
After exploring how to flexibly swap behaviors using the Strategy Pattern, we now venture into one of the most elegant ways to **add functionality dynamically**...
By Misbahul Munir
Strategy Pattern: Switching Algorithms at Runtime
So far in this series, we’ve explored the Singleton and Factory patterns—two of the most used creational patterns in backend development. In today’s post, we’re...
By Misbahul Munir
Factory Pattern: Your Object Assembly Line
In our previous post, we explored the Singleton Pattern—a way to ensure a single instance of a class. Today, let’s dive into another classic and practical desig...
By Misbahul Munir