Project containing real examples of design patterns, contain a guide to help the developers interest in this solutions
All the information provided has been compiled & adapted from many references, some of them cited at the end of the document. The guidelines are illustrated by my own examples, fruit of my personal experience writing and reviewing unit tests.
- Architectural
- Data access
- Performance
- [CQRS]
- Behavioral
- Main patterns
- [Chain of responsibility]
- [Command]
- [Interpreter]
- [Iterator]
- [Memento]
- [Null object]
- [State]
- [Strategy]
- [Template method]
- [Visitor]
- Other patterns
- [Caching]
- [Feature toggle]
- [Mediator]
- [Pipeline]
- [Circuit breaker]
- Main patterns
- Cloud
- [Health Check Pattern]
Claim Check Pattern(Does not apply to this project)
- Concurrency
- [Saga]
- Creational
- Main patterns
- Abstract factory
- Builder
- Factory
- Factory method
Object pool(Does not apply to this project)Prototype(Does not apply to this project)- Singleton
- Other patterns
- Converter
- [Dependency injection]
- Value object
- Main patterns
- Functional
- There are no examples yet
- Structural
- [Adapter]
- [Bridge]
- [Composite]
- [Decorator]
- Facade
- [Flyweight]
- Tests Strategies
- Main types
- Other types
- Main resources concepts
Downloading the composer.
./script/install.sh
Check the extensions:
php -m
Install the other requires extensions:
sudo apt install php8.1-xml
sudo apt install php8.1-mbstring
sudo apt install php8.1-mysql
Check the extensions:
php -m
To configure the swagger the first step is to execute the follow command:
php artisan swagger-lume:publish
Commands details:
- Run
php artisan swagger-lume:publish-config
to publish configs (config/swagger-lume.php) - Run
php artisan swagger-lume:publish-views
to publish views (resources/views/vendor/swagger-lume) - Run
php artisan swagger-lume:publish
to publish everything - Run
php artisan swagger-lume:generate
to generate docs
Open the generated file config/swagger-lume.php
and change the follow lines:
'api' => '/docs',
'docs' => '/openapi.json',
'annotations' => base_path('src/Application'),
'docs_json' => 'openapi.json',
Execute the follow command:
php artisan swagger-lume:generate
Execute the follow command:
./scripts/lumen/create-storage.sh
Access the follow endpoint:
http://localhost:8000/docs
php artisan make:migration orders
ERROR: Network service-php-v1 declared as external, but could not be found. Please create the network manually using docker network create service-php-v1
and try again.
Solution:
./scripts/docker/create-network.sh
- https://thephpleague.com/
- https://java-design-patterns.com/patterns/
- https://docs.microsoft.com/pt-br/azure/architecture/patterns/
- https://www.eventhelix.com/design-patterns
- https://deviq.com/design-patterns/design-patterns-overview
- https://sourcemaking.com/design_patterns
- https://java-design-patterns.com/patterns
- https://refactoring.guru/design-patterns
- https://www.applause.com/blog/functional-testing-types-examples
- https://martinfowler.com/articles/microservice-testing/
- https://www.atlassian.com/continuous-delivery/software-testing/types-of-software-testing