Hexagonal Architecture, Visualized
Hexagonal architecture (ports and adapters) is about dependency direction: the domain sits in the middle, and everything external — database, web framework, message queue — plugs in through an interface. This video draws the hexagon and what it means for code: the domain defines the ports, adapters implement them, and the core never imports a driver library.
Topics covered:
- The hexagon: application core, driving ports, and driven ports in one picture
- Driving ports: what the outside calls in — use cases as interfaces
- Driven ports: what the core calls out — repositories, not databases
- Adapters: the HTTP handler and Postgres repository as interchangeable plugs
- Why all arrows point inward and who owns each interface
- The dependency inversion behind it vs. layered architecture
- Testing payoff: swapping a real DB for an in-memory adapter
- The cost: extra interfaces, and when it doesn't pay
Related articles
Hexagonal Architecture: Ports, Adapters, and Where the Boundary Really Goes
Hexagonal architecture isolates your domain behind ports and adapters — here is where the boundary actually belongs, what it buys you in tests, and when it is pure ceremony.
The Law of Demeter in Practice
Message chains, the law of diminishing knowledge, and why 'don't talk to strangers' prevents the most brittle code you'll ever write.
Dependency Injection and Composition Roots: Why Containers Exist
Dependency injection moves construction out of classes and into a composition root — how constructor injection, lifetimes, and DI containers actually work, and why service locator is a trap.
More in Software Architecture
The Strangler Fig Pattern
How to replace a legacy system without a rewrite — routing by path, strangling features incrementally, and keeping both systems honest.
DetailsDomain-Driven Design Basics
The core of DDD without the ceremony — ubiquitous language, bounded contexts, aggregates, and where the model boundary actually goes.
DetailsService Mesh Explained
What a service mesh actually does — sidecars, mTLS, traffic routing, and observability — and the network plumbing it takes off your plate.
DetailsFeature Flags in Practice
How feature flags work end to end — evaluation at runtime, kill switches, and canary rollouts — plus the operational discipline they demand.
DetailsThe Saga Pattern Explained
How distributed transactions work without distributed locks — saga steps, compensating actions, and the orchestration vs. choreography split.
DetailsCQRS Explained
Command query responsibility segregation — separate read and write models, why they diverge, and what you actually gain from the split.
DetailsAPI Gateway Patterns
What an API gateway actually does — routing, auth, rate limiting, and aggregation — and which patterns matter for your traffic.
DetailsEvent-Driven Architecture Explained
How event-driven systems work — events, topics, and consumers — and what the broker actually guarantees in a distributed system.
DetailsMicroservices vs. Monolith
The honest engineering comparison — deployment boundaries, data ownership, failure domains, and the real costs of splitting a system.
DetailsDepth, delivered weekly
One technical dispatch a week — articles and episode notes before they go public.
One technical dispatch per week. No noise.