This repository contains tutorials and examples for various design patterns in Python. Below is a list of available tutorials with brief explanations:
- Abstract Factory - Creates families of related objects without specifying their concrete classes.
- Builder - Constructs complex objects step by step, separating construction from representation.
- Factory Method - Defines an interface for creating objects but lets subclasses decide which class to instantiate.
- Singleton - Ensures a class has only one instance and provides a global point of access to it.
- Adapter - Allows objects with incompatible interfaces to collaborate.
- Bridge - Decouples an abstraction from its implementation so the two can vary independently.
- Composite - Composes objects into tree structures to represent part-whole hierarchies.
- Decorator - Attaches new behaviors to objects dynamically by placing them inside wrapper objects.
- Facade - Provides a simplified interface to a library, a framework, or any other complex set of classes.
- Flyweight - Lets you fit more objects into the available amount of RAM by sharing common parts of state between multiple objects.
- Chain of Responsibility - Passes requests along a chain of handlers allowing each to process or pass it.
- Command - Encapsulates a request as an object, allowing for parameterization of clients with different requests.
- Iterator - Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
- Mediator - Reduces chaotic dependencies between objects by restricting direct communications between them.
- Observer - Defines a subscription mechanism to notify multiple objects about any events that happen to the object they are observing.
- State - Allows an object to alter its behavior when its internal state changes.
- Strategy - Defines a family of algorithms, encapsulates each one, and makes them interchangeable.