Layered vs Hexagonal vs Onion vs Clean Architecture | Visually Explained
Nexus Dots
0:00 / 0:00
Layered vs Hexagonal vs Onion vs Clean Architecture | Visually Explained
1 447 просмотров · 2 нед. назад
Nexus Dots
226 подписчиков
1 447 просмотров · 2 нед. назад
Layered, hexagonal, onion and clean architecture — what actually changes between them? See how each organizes the code inside an application, where the dependencies point, and why that matters when you need to make a change.
We start with tangled code, separate it into three layers, then turn the database dependency around. From there, we explore ports and adapters, the rings of onion architecture, and the entities, use cases and interface adapters in clean architecture.
You'll see how dependency inversion differs from dependency injection, why code dependencies aren't the same as the direction of a call, and how separating business logic from outside tools helps with testing. We also look at the extra work this separation adds and when a simpler structure may be enough.
CHAPTERS
00:00 What is application architecture?
00:37 When code becomes a big ball of mud
01:08 Layered architecture — the three layers
02:10 Hexagonal architecture — ports and adapters
03:32 Dependency inversion and the direction of the arrows
03:57 Dependency injection and testing without a database
04:43 Onion architecture — organizing the core
06:07 Clean architecture — entities, use cases and adapters
07:10 What hexagonal, onion and clean have in common
07:26 When is the extra separation worth it?
07:51 The differences side by side
ORIGINAL ARTICLES
Alistair Cockburn — [Hexagonal Architecture](https://alistair.cockburn.us/hexagona...)
Jeffrey Palermo — [The Onion Architecture](https://jeffreypalermo.com/2008/07/th...)
Robert C. Martin — [The Clean Architecture](https://blog.cleancoder.com/uncle-bob...)
Nexus Dots — software concepts, visually explained.
Subscribe for more visual explanations, and let me know which concept you'd like me to cover next.
#SoftwareArchitecture #CleanArchitecture #HexagonalArchitecture