Giter VIP home page Giter VIP logo

design-patterns's Introduction

Java Design Patterns Projects ⬑


This repository contains a Java project demonstrating various design patterns as specified in the "Gang of Four" book and other commonly used design patterns. Each design pattern is implemented as a separate module within the project, and the module name corresponds to the design pattern being demonstrated.

πŸ› οΈ Introduction

Design patterns are reusable solutions to common problems encountered in software design. They provide a template for solving problems in a particular way, offering a structured approach to design and development. Understanding and implementing design patterns can lead to more efficient, maintainable, and scalable code.

This project aims to provide a practical demonstration of various design patterns in Java. Each design pattern is implemented in a separate module, making it easy to understand and test individual patterns.

πŸ—‚οΈ Project Structure

The project structure is organized as follows:

  • creational_patterns/
  • structural_patterns/
  • behavioral_patterns/

Each directory contains the implementation of different design patterns, separated into their respective categories.

πŸ“š Design Patterns Implemented

Creational Patterns:

  • 🏭 Abstract Factory Pattern
  • πŸ—οΈ Builder Pattern
  • 🏭 Factory Method Pattern
  • 🧬 Prototype Pattern
  • πŸ”’ Singleton Pattern

Structural Patterns:

  • πŸ”Œ Adapter Pattern
  • πŸŒ‰ Bridge Pattern
  • 🌳 Composite Pattern
  • 🧩 Decorator Pattern
  • 🏒 Facade Pattern
  • πŸ•΅οΈ Proxy Pattern

Behavioral Patterns:

  • πŸ”— Chain of Responsibility Pattern
  • πŸ—„οΈ Command Pattern
  • 🌐 Interpreter Pattern
  • πŸ”„ Iterator Pattern
  • 🎀 Mediator Pattern
  • 🧠 Memento Pattern
  • πŸ‘€ Observer Pattern
  • 🎭 State Pattern
  • πŸ—ΊοΈ Strategy Pattern
  • πŸ§ͺ Template Method Pattern
  • πŸ‘¨β€πŸ”§ Visitor Pattern

πŸš€ How to Use

To use this project:

  1. Clone the repository to your local machine:
    git clone https://github.com/yourusername/design-patterns-java.git
  2. Navigate to the desired design pattern module:
    cd design-patterns-java/creational_patterns/builder
  3. Follow the instructions provided in the README.md file within the module to understand the pattern and run the example code:
    javac *.java
    java Main

🀝 Contributing

Contributions are welcome! If you'd like to contribute to this project by adding more design patterns, improving existing implementations, or fixing bugs, please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/your-feature
  3. Make your changes.
  4. Commit your changes:
    git commit -am 'Add new feature'
  5. Push to the branch:
    git push origin feature/your-feature
  6. Create a new Pull Request.

By structuring and documenting design patterns in a comprehensive way, this project aims to serve as a valuable resource for developers looking to deepen their understanding of software design principles and improve their coding practices. Happy coding! πŸŽ‰

design-patterns's People

Contributors

prathmesh311 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.