Skip to content

This repository has all my studies with design patterns.

Notifications You must be signed in to change notification settings

fbsouzas/design-pattern

Repository files navigation

Design Pattern with PHP

This repository has all my studies with design patterns.

Behavioral Patterns

Strategy

I used this pattern to solve the calculation a lot of taxes:

Chain Of Resposibility

I used this pattern to solve the calculation of a lot of discounts scenarios:

Template Method

I used this pattern to solve the calculation of taxes with different rates to the same tax:

State

I used this pattern to solve the budget state:

Command

I used this pattern to encapsulate all business logic to generates a new order:

Observer

I used this pattern to encapsulate all actions before generating a new order:

Iterator

I used this pattern to iterator about a budget list:

Structural Patterns

Adapter

I used this pattern to implement differents way to request external APIs:

Bridge

I used this pattern to generate different reports in different formats easily:

Decorator

I used this pattern to calculate combined budget taxes:

Composite

I used this pattern to combine items and other budgets in a new budget:

Facade

I used this pattern to encapsulate all logic in the budget discount calculator:

Proxy

I used this pattern to cached some values that take 1 second to return from an external request simulation.

Flyweights

I used this pattern to optimize and reduce the quantity of RAM consumed:

Creational Patterns

Factory Methods

I used this pattern to implement logs in different outputs:

Abstract Factory

I used this pattern to receive specific tax to the specific sale type:

Builder

I used this pattern to create spacific complex invoices classes:

Prototype

I used this pattern to create a new budget based on an older budget:

Singleton

I used this pattern to create just one instance of the database connector:

About

This repository has all my studies with design patterns.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published