Hexagonal Architecture with Dotnet 6 — Part 1: Introduction and Requirements
Introduction.
The hexagonal architecture or architecture of ports and adapters, was created with two clear objectives:
- Absolutely isolate the core logic of our application.
- Being able to apply changes to our “consumers” or “controllers” without the need to adjust or change the core logic.
In this and the following posts I will not go into extensive detail of the theory, I will focus on the practice. Therefore, if you want to document yourself a little about it, here are two good posts about it.
Definition, benefits and layers of this architecture:
Visual explanation of its layers and basic example (in typescript):
WARNING: to implement this architecture you must be aware that you need to be clear about the concepts of SOLID, OPP and DDD. The book: Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans can help you a lot.
Requirements.
Visual Studio Comunity 2022 (you can use Enterprise, etc…) Click here.
Docker Desktop. Clic here.
Docker will be used to run containers with images like: RabbitMQ, PostgreSQL, Redis and more… If you want to install all this without Docker, just do it, that doesn’t change anything.
See you in the next article.