-
-
Notifications
You must be signed in to change notification settings - Fork 695
Architecture Styles
Manga uses ideas from popular architectural styles. The Ports and Adapters are the simplest one followed by the others, they complement each other and aim a software made by use cases decoupled from technology implementation details.
The general idea behind Hexagonal architecture style is that the dependencies (Adapters) required by the software to run are used behind an interface (Port).
The software is divided into Application and Infrastructure in which the adapters are interchangeable components developed and tested in isolation. The Application is loosely coupled to the Adapters and their implementation details.
Interfaces like ICustomerRepository
, IOutputPort
and IUnitOfWork
are ports required by the application.
The interface implementations, they are specific to a technology and bring external capabilities. For instance the CustomerRepository
inside the EntityFrameworkDataAccess
folder provides capabilities to consume an SQL Server database.
Primary Actors are usually the user interface or the Test Suit.
The Secondary Actors are usually Databases, Cloud Services or other systems.
Very similar to Ports and Adapters, I would add that data objects cross boundaries as simple data structures. For instance, when the controller execute a use case it passes an immutable Input message. When the use cases calls a Presenter it gives an Output message (Data Transfer Objects if you like).
The Clean Architecture style focus on a loosely coupled implementation of use cases and it is summarized as:
- It is an architecture style that the Use Cases are the central organizing structure.
- Follows the Ports and Adapters pattern.
- The implementation is guided by tests (TDD Outside-In).
- Decoupled from technology details.
- Follows lots of principles (Stable Abstractions Principle, Stable Dependencies Principle, SOLID and so on).
- Value Object
- Entity
- Aggregate Root
- Repository
- Use Case
- Bounded Context
- Entity Factory
- Domain Service
- Application Service
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
- Swagger and API Versioning
- Microsoft Extensions
- Feature Flags
- Logging
- Data Annotations
- Authentication
- Authorization