This repository contains implementations of various design patterns. Each branch corresponds to a different design pattern.
-
- This branch includes an implementation of the Factory Pattern.
- The Factory Pattern provides an interface for creating instances of a class, allowing subclasses to alter the type of objects that will be created.
-
- This branch demonstrates the Builder Pattern.
- The Builder Pattern separates the construction of a complex object from its representation, allowing the same construction process to create different representations.
-
- This branch showcases the Factory Method Pattern.
- The Factory Method Pattern defines an interface for creating an object but lets subclasses alter the type of objects that will be created.
-
- This branch illustrates the Prototype Pattern.
- The Prototype Pattern allows for creating new objects by copying an existing object, providing a more efficient way to create instances.
-
- This branch implements the Decorator Pattern.
- The Decorator Pattern attaches additional responsibilities to an object dynamically. It provides a flexible alternative to subclassing for extending functionality.
-
- This branch demonstrates the Singleton Pattern.
- The Singleton Pattern ensures that a class has only one instance and provides a global point of access to that instance.
-
- This branch includes an implementation of the Adapter Pattern.
- The Adapter Pattern allows incompatible interfaces to work together, acting as a bridge between them.
-
- This branch showcases the Bridge Pattern.
- The Bridge Pattern separates abstraction from implementation, allowing them to vary independently.
-
- This branch illustrates the Facade Pattern.
- The Facade Pattern provides a unified interface to a set of interfaces in a subsystem, making it easier to use.
-
Clone the repository:
git clone https://github.com/muminvarici/design-patterns.git
-
Checkout the branch corresponding to the design pattern you want to explore:
git checkout branch-name
-
Explore the code and learn how each design pattern is implemented.
Feel free to reach out for any questions or clarifications.
Happy coding!