The Iterator design pattern is a behavioral pattern that provides a way to iterate through the elements of a collection one by one without paying attention to the details of the collection. This pattern promotes encapsulation and allows the internal structure of the collection to be changed without affecting the client code. For example, if the collection structure is changed from an array to a list, the client codes will not change.
The Memento design pattern is a behavioral pattern that allows an object to save its previous state so that it can easily return to that state later. This pattern is useful when you want to restore an object to a previous state or when you need to undo a series of actions.
The State design pattern is a behavioral pattern that allows an object to change its behavior as needed. This pattern helps to separate the behavior of an object from its state and provides a possibility to switch between different states dynamically.
The Strategy design pattern is a behavioral design pattern that allows defining a set of methods that can be replaced at runtime.
The Template Method pattern is a behavioral design pattern that defines the skeleton of an algorithm in a abstract base class and allows subclasses to implement specific steps of the algorithm without changing its overall structure. This pattern is useful when multiple classes have similar operations but with different implementations.
The Observer design pattern is a behavioral design pattern that connects an object to several dependent classes. This pattern provides the possibility that when the state of an object changes, its dependent objects are automatically notified and updated.
Visitor design pattern is a behavioral design pattern that allows you to separate object behavior from object structure. This pattern is useful when you have a complex object structure and want to add new operations to it without changing the objects themselves.
The Command design pattern is a behavioral design pattern that encapsulates a request as an object and separates the sender of the request from the receiver of the request.
The Chain of Responsibility pattern is a behavioral design pattern that enables an object to send a request along a chain of handlers until one of them handles it.
Flyweight pattern is a structural design pattern used to minimize memory usage and improve program performance. This pattern avoids excessive memory consumption by sharing objects with similar properties.
The Facade design pattern is a structural design pattern that provides a simple interface to a complex set of classes, interfaces, and objects. This pattern hides the complexity of the system and provides a single entry point to access the system.
The Decorator design pattern is a structural design pattern that allows you to dynamically add behavior to an object at runtime. This template can add additional behavior to a class or modify existing behavior without changing the parent object.
The Composite design pattern is a structural design pattern that allows you to combine objects in tree structures to create a hierarchy of objects.
The Interpreter design pattern is a behavioral design pattern that provides a way to interpret sentences or phrases in a defined language.
Proxy pattern is a structural pattern that provides a substitute or placeholder for another object through which that object can be controlled.
The Bridge pattern is a structural design pattern that separates abstractions from implementations so that they can be independent.
The Abstract Factory pattern is a creational design pattern that allows the creation of a collection of related or dependent objects without specifying their class types.
The Prototype pattern is a creational pattern that allows you to create a new object from an existing object. The new object copies all the values in the original object.
The Builder pattern is a creational pattern that is used to separate the process of building a complex object from that class itself.
The Singleton pattern is a creational design pattern that ensures that a class has only one instance and provides only one access point to that instance.
In this article, we introduce the factory design pattern.
The Mediator design pattern is a behavioral design pattern that enables loose coupling between different components by providing a central communication container.
Adapter design pattern is a structural design pattern that connects two incompatible classes through an interface class.