-
Observer Design pattern
The Observer design pattern is a perfect fit for scenario where you want to notify multiple subscribers about updates. Follow more posts @ https://jdecodes.wordpress.com My all design pattern articles :
-
Memento Design Pattern
Memento: something that you keep to remind you of somebody/something Imagine you’re working on a drawing application. You make some strokes, but then you decide you don’t like them. The Memento pattern allows you to capture the state of your drawing (the color, line thickness, strokes made so far) at any point and restore it…
-
State Design Pattern
The State Pattern allows an object to alter its behavior when its internal state changes. It achieves this by defining an interface (or abstract base class) for various states and concrete classes for each specific state. The context object holds a reference to the current state and delegates behavior based on that state. Problems to…
-
Mediator Design Pattern
Mediator pattern can be used when colleague need to talk to each other, without talking to each other.c1 (colleague 1 ) talks to Mediator -> If needed Mediator communicates to c2. Follow more posts @ https://jdecodes.wordpress.com My all design pattern articles :
-
Iterator design pattern
Summary of Iterator Pattern Usage:Purpose: Use the Iterator pattern when you need to iterate over elements of a collectionwithout exposing the internal structure to the client code. Implementation Approaches: Custom Iterator (hasNext()/next()): Approach 1 Diagram approach 2 diagram Code 1 : Approach 1: client code from approach 1: Approach 2 to use begin/end from underylying…
-
Command Design Pattern
Official defintion The Command Pattern is a behavioral design pattern that focuses on encapsulating a request asan object, thereby decoupling the sender of the request from the receiver. This patternallows you to parameterize objects with commands, delay or queue a request’s execution, andsupport undoable operations. It’s a fundamental pattern for implementing a wide range offunctionality…
Subscribe
Enter your email below to receive updates.