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

https://github.com/yossef-ashraf/design-patterns

This repository contains a collection of solid & design patterns used in software engineering.
https://github.com/yossef-ashraf/design-patterns

design-patterns docker oop php phpunit-tests solid

Last synced: 4 months ago
JSON representation

This repository contains a collection of solid & design patterns used in software engineering.

Awesome Lists containing this project

README

          

# Design Patterns

This repository contains a collection of design patterns used in software engineering. This project aims to demonstrate how different design patterns can be applied to improve the structure and efficiency of software. The repository contains practical examples annotated in the programming language used for each design pattern mentioned.

## Contents

- **Creational Patterns**
- **Structural Patterns**
- **Behavioral Patterns**

## Project Advantages

- Real-life examples of each design pattern.
- Detailed explanations of practical applications.
- Clear and complete documentation for each part.

## How to Use

1. **Clone Repository:**
```bash
git clone https://github.com/yossef-ashraf/Design-Patterns.git
```

2. **Browse Styles:**
Review the code and documentation to understand how to implement each design pattern.

3. **Running Examples Locally:**
It is recommended to download the project and run it locally to try the code yourself.

## Running the Project with Docker

1. **Build the Docker Image:**
```bash
docker build -t design-patterns .
```

2. **Run the Docker Container:**
```bash
docker run -p 8000:80 design-patterns
```

OR

**Run the Docker Container with Docker Compose:**
```bash
docker-compose up --build
docker-compose up
```

3. **Shut Down the Docker Container:**
```bash
docker-compose down
docker-compose down -v
```

Access the project at `http://localhost:8000`.

## Running the Project with PHP

1. **Ensure PHP is Installed:**
Make sure you have PHP installed on your machine. You can download it from [here](https://www.php.net/downloads).

2. **Navigate to the Project Directory:**
```bash
cd Design-Patterns
```

3. **Start PHP Built-in Server:**
```bash
php -S localhost:8000
```

Access the project at `http://localhost:8000`.

## Contribution

We welcome contributions to improve this project. If you would like to participate, please open an "Issue" or submit a "Pull Request".

## License

This project is licensed under the [MIT License](LICENSE).

---

With Regards,
[Yossef Ashraf](https://github.com/yossef-ashraf)