From the course: Software Architecture: Patterns for Developers
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Ports and adapters (or hexagonal)
From the course: Software Architecture: Patterns for Developers
Ports and adapters (or hexagonal)
- [Instructor] Now it's time to explore the ports and adapters architecture, also called the hexagonal architecture. Like the onion architecture, the core module is the business logic or the domain. This core then defines the interfaces it needs to interact with the outside world. These are called the ports. Finally, there are specific implementations that use or implement these ports. We call those the adapters. The pattern distinguishes between primary and secondary adapters. Primary adapters drive the application, which means they make calls to the domain. Secondary adapters, on the other hand, are driven by the application, meaning they get called by the domain. As an example, a primary adapter could be a user interface, console application, or unit tests. Examples of secondary adapters are blob storage clients, SQL server repositories, or even fake implementations for the unit tests. You may think that this doesn't differ a lot from the onion architecture, and you're right, but…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Layered3m 39s
-
(Locked)
Onion3m 12s
-
(Locked)
Ports and adapters (or hexagonal)2m 32s
-
(Locked)
Differences between layered, onion, and hexagonal2m 25s
-
(Locked)
Modular monolith4m 37s
-
(Locked)
Microkernel3m 12s
-
(Locked)
CQRS4m 39s
-
(Locked)
Event sourcing5m 24s
-
Combining CQRS and event sourcing3m 36s
-
(Locked)
-
-