Design-Patterns is a curated library demonstrating the implementation of essential software design patterns in Java, aimed at helping developers craft flexible, maintainable, and scalable systems. It provides practical, real-world examples that illustrate best practices across various architectural challenges.
Why design-patterns?
This project simplifies the adoption of proven design principles. The core features include:
- 🧩 Adapter: Seamlessly integrate legacy systems with modern interfaces, ensuring compatibility and extensibility.
- 🎨 Decorator: Enable dynamic, runtime customization of objects like pizzas with toppings, promoting flexible feature extension.
- 🔔 Observer: Facilitate real-time, decoupled communication for event-driven architectures such as stock updates.
- ⚙️ Factory: Centralize object creation for notifications, supporting scalable and flexible system expansion.
- 🛠️ Singleton: Ensure controlled, single-instance resources like logging services across your application.
- 📦 Pattern Showcase: A comprehensive set of examples illustrating best practices for scalable software design.
This project requires the following dependencies:
- Programming Language: Java
- Package Manager: Maven
Build design-patterns from the source and install dependencies:
-
Clone the repository:
❯ git clone https://github.com/daniel-sde/design-patterns -
Navigate to the project directory:
❯ cd design-patterns -
Install the dependencies:
Using maven:
❯ mvn install
Run the project with:
Using maven:
mvn exec:java
Design-patterns uses the {test_framework} test framework. Run the test suite with:
Using maven:
mvn test
