Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 20 hours ago
JSON representation

Exploring Design Patterns in Practice with Java. This course is a module of the Bootcamp organised by DIO - Digital Innovation.

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)