Hexagonal architecture (also known as ports and adapters) is a software design pattern proposed by Alistair Cockburn in 2005 that isolates business logic from external I/O by placing all inputs and outputs at the edges of the system. The core application communicates exclusively through port interfaces, while adapters handle the concrete technology (databases, HTTP, messaging). The pattern has two sides: driving (inbound) adapters that call the core, and driven (outbound) adapters the core calls. Dependencies always point inward — the domain owns the interfaces, and infrastructure implements them. This enables swapping databases, UIs, or transport layers without touching business logic, and makes unit testing fast by substituting in-memory fakes. The post covers C# implementation examples, .NET solution structure, comparisons with layered/onion/clean architecture, DDD integration, domain-to-adapter mapping strategies, a Netflix real-world case study, and when not to use the pattern.