#clearyourconcepts

State Pattern

The State Pattern is a behavioral design pattern that allows an object to alter its behavior when its internal state changes. The pattern encapsulates states as separate classes and delegates the state-specific behavior to these classes. This makes it easy to add new states and modify the behavior of an object without altering its structure. […]

State Pattern Read More »

Memento Pattern

The Memento pattern also known as Token is a behavioral design concept that enables the preservation and retrieval of an object’s prior state discreetly, without exposing the details of its internal structure and implementation. Imagine creating a text editor app with an undo feature. To save states for undo, the app records object states before

Memento Pattern Read More »

Mediator Pattern

The Mediator pattern, also known as the Intermediary or Controller, helps manage communication between different objects. It stops objects from talking to each other directly and makes them talk only through a mediator. This keeps things more organized and prevents messy connections between objects. In air traffic control systems multiple aircraft need to coordinate their

Mediator Pattern Read More »

Iterator Pattern

The Iterator Pattern also known as Cursor is a behavioral design pattern that provides a way to access elements of an aggregate object (such as a collection) sequentially without exposing the underlying representation of that object. It is used to traverse a container of elements, allowing clients to access its elements without needing to know

Iterator Pattern Read More »

Command Pattern

The Command Pattern, alternatively referred to as the Action or Transaction pattern, belongs to the category of behavioral design patterns. It involves the conversion of a request into an independent object that encapsulates all relevant information about the request. This transformation enables the passing of requests as method arguments, facilitates the postponement or queuing of

Command Pattern Read More »

Flyweight Pattern

The Flyweight pattern is primarily employed to minimize the volume of object instances and, consequently, reduce memory consumption while enhancing performance. This design pattern falls within the structural pattern category, as it offers techniques for reducing the total number of objects, thereby enhancing the organization of objects within an application. The Flyweight pattern aims to

Flyweight Pattern Read More »

Proxy Pattern

The Proxy pattern is a structural design pattern that allows an object (the proxy) to act as an intermediary or placeholder for another object, controlling access to it. It is often used to add a level of control or optimization to the interactions with the real object, such as lazy loading, access control, or logging.

Proxy Pattern Read More »

Facade

A Facade is a structural design pattern that acts as an interface to a larger and more complex set of classes, simplifying the interaction with those classes by providing a unified and simplified interface. It hides the intricacies and complexities of the underlying system, making it easier for clients to work with. Computer graphics involve

Facade Read More »

Decorator Pattern

The Decorator pattern belongs to the category of structural design patterns. It provides a way to enhance the functionality of objects by enclosing them within wrapper objects, which in turn, impart additional behaviors to these objects. When developing a reporting system, you need to provide flexibility for users to customize the content and appearance of

Decorator Pattern Read More »

Scroll to Top