Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrezatcascais/dio-lab-patterns-project-java
Exploring Design Patterns in Practice with Java. This course is a module of the Bootcamp organised by DIO - Digital Innovation.
https://github.com/andrezatcascais/dio-lab-patterns-project-java
backend bootcamp-project design-patterns facade-pattern gof-patterns intellij java17 mid-level oop singleton-pattern strategy-pattern
Last synced: 3 months ago
JSON representation
Exploring Design Patterns in Practice with Java. This course is a module of the Bootcamp organised by DIO - Digital Innovation.
- Host: GitHub
- URL: https://github.com/andrezatcascais/dio-lab-patterns-project-java
- Owner: andrezatcascais
- Created: 2024-08-07T20:57:44.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T00:48:24.000Z (5 months ago)
- Last Synced: 2024-09-27T05:20:09.602Z (3 months ago)
- Topics: backend, bootcamp-project, design-patterns, facade-pattern, gof-patterns, intellij, java17, mid-level, oop, singleton-pattern, strategy-pattern
- Language: Java
- Homepage: https://www.dio.me/en
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Design Patterns
This repository contains examples and explanations for three common design patterns: Singleton, Strategy, and Facade.
## Singleton
The Singleton pattern ensures a class has only one instance and provides a global point of access to it.
- **Intent**: To control object creation, limiting the number of objects to one.
- **Use Case**: When only one instance of a class is needed to coordinate actions across a system.### [Structure](https://sourcemaking.com/design_patterns/singleton)
![img.png](assets/img.png)
#### [Example about the Singleton Pattern](./src/main/java/one/digitalinnovation/gof/singleton)## Strategy
The Strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable.
- **Intent**: To define a family of algorithms, encapsulate each one, and make them interchangeable.
- **Use Case**: When you want to define a class that will have one behavior that is similar to other behaviors in a list.### [Structure](https://sourcemaking.com/design_patterns/strategy)
![img_1.png](assets/img_1.png)
#### [Example about the Strategy Pattern](./src/main/java/one/digitalinnovation/gof/strategy)## Facade
The Facade pattern provides a simplified interface to a complex subsystem.
- **Intent**: To provide a unified interface to a set of interfaces in a subsystem.
- **Use Case**: When you want to provide a simple interface to a complex subsystem.### [Structure](https://sourcemaking.com/design_patterns/facade)
![img_2.png](assets/img_2.png)
#### [Example about the Facade Pattern](./src/main/java/one/digitalinnovation/gof/facade)