Get the latest tech news

Hexagonal Architecture and Rails


When learning the Ports & Adapters pattern, I found it confusing. For some reason, it never clicked that the term adapter was a direct reference to the Gang of Four Adapter Pattern. Discovering that was a real face-palm moment for me. And, it was the key to unlocking my understanding of the pattern.

Last night, Fito and I watched Alistair Cockburn's Hexagonal Architecture talk from the Tech Excellence Conference. It requires the "application" (business / domain logic) to provide both an inbound ("driving") API and an outbound ("driven") SPI. Having written both traditional Rails apps and systems that use the Ports & Adapters Pattern, I can tell you first hand that the water is better in the hexagon!

Get the Android app

Or read this on Hacker News