This image was taken from: https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together

Hexagonal Architecture with Dotnet 6 — Part 1: Introduction and Requirements

Oscar Chávez

--

Introduction.

The hexagonal architecture or architecture of ports and adapters, was created with two clear objectives:

  1. Absolutely isolate the core logic of our application.
  2. 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.

--

--

Oscar Chávez

I’m a software developer with experience developing web applications (APIs and microservices) using .NET and ReactJS, I also have experience with Flutter.