Skip to content

NemesisGuy/Design-Patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design-Patterns

Copyright (c) [2023]

These are basic examples of all the GOF 23 Design Patterns implemented in Java.

Project Design Patterns

Introduction

This project incorporates various design patterns from the famous Gang of Four design patterns. These design patterns provide proven solutions to recurring design problems, enhancing flexibility, maintainability, and scalability of the system.

Creational Patterns

These patterns focus on object creation mechanisms, aiming to create objects in a manner suitable to the situation. They hide the specifics of object creation, making the system more flexible and independent of the system's evolution. The creational patterns included in this project are:

  • Singleton
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype

Structural Patterns

Structural patterns deal with object composition, creating relationships between objects to form larger structures. They help in building flexible and efficient systems by defining clear ways to compose objects. The structural patterns included in this project are:

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

Behavioral Patterns

Behavioral patterns focus on communication between objects, managing the algorithms and responsibilities between cooperating objects. They help define clear and efficient communication mechanisms between objects. The behavioral patterns included in this project are:

  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

How to Use

Each pattern is implemented in its respective module. To incorporate a specific pattern into your project, follow these steps:

  1. Navigate to the Desired Pattern Module:

    • Go to the directory corresponding to the design pattern you want to use.
  2. Copy the Relevant Files:

    • Copy the necessary files (classes, interfaces, etc.) related to the pattern into your project.
  3. Integrate the Pattern:

    • Implement the pattern in your codebase by utilizing the classes and interfaces from the copied files.
  4. Modify as Needed:

    • Tailor the implementation to suit the specific requirements of your project.

Examples and Usage

For examples and usage guidelines specific to each design pattern, please refer to the respective module's documentation.

License

This project is licensed under the MIT License.

Acknowledgements

Special thanks to the Gang of Four for their pioneering work in design patterns, as well as to the authors of the following resources:

Refactoring.guru

About

These are basic examples of all the GOF 23 Design Patterns implemented in Java.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages