Porto is a modern Software Architectural Pattern, designed to help developers organize their Code in a super maintainable way.
It consists of 3 Layers Containers
, Services
and Kernel
. And a set of Components
with predefined responsibilities.
Porto is very helpful for big and long term projects, as these projects tend to have higher complexity with time.
It is inspired by the DDD (Domain Driven Design) and MVC (Model View Controller) patterns. It adapts techniques from multiple architectures (Layered, Service Oriented, Modular and Command Oriented). And it adheres to the best design principles (SOLID, LIFT, Generalization, GRASP and more).
Porto is Laravel 5 friendly :)
- Reusable Code (Containers of Business Logic).
- Easy to understand by any developer (less magic, more readable code).
- Fast Development (easy to implement new features).
- Decoupled Code (editing this doesn’t break that).
- Organized Code base.
- Easy Maintenance (easy to adapt changes).
- Zero Technical debt (low communication between Developers).
- Scalable Code (easy to modify and add features).
- Easy to Test (test driven).
- Easy Framework Upgrade.
- Zero Code Decoupling.
- Simple folders structure. (easy to locate anything and everything).
- Clear workflow (predefined and documented).
In a typical scenario:
User
calls an Endpoint (defined in aRoute
file).Endpoint
calls aController
.- (
Request
injected in theController
automatically applies the request validation rules). Controller
run aTask
and pass theRequest
data to it.Task
run multipleSubtasks
(takes data from one and pass it to another one).Subtasks
performs the business logic (can also call someServices
).Subtasks
returns result data to theTask
.Task
returns the collected results data to theController
.Controller
builds the response and send it back to theUser
.
- Porto Layers
- Container's Main Components
- Container's Additional Components
- Documentations under final review, links will be available in few days.
Coming soon..
Ready to see it in action!
- Build anything with Laravel Porto (an implementation of the Porto SAP in Laravel 5.1).
- Build API-Centric Apps with Hello API (an API starter, built with Laravel Porto).
Authors | Site | Contact | |
---|---|---|---|
Mahmoud Zalt | @Mahmoud_Zalt | zalt.me | [email protected] |