“Looking at the screen of my laptop, I realized that it was full of code that didn’t let me understand what it did regarding business logic. From that moment I began to search until I discovered the architecture that decouples the business logic from the frameworks: Hexagonal Architecture, more correctly called Ports & Adapters. From that moment until now, I haven’t stopped reading and learning about this pattern.�
Recommended by giants like Netflix and Amazon, the Hexagonal or Ports & Adapters architecture simplifies testing, protects against business logic leakage, supports changing technologies in long-running system, and lets you apply Domain Driven Design. In this definitive book on the subject, pattern author Dr. Alistair Cockburn and Juan Manuel Garrido de Paz lay bare all of the intricacies of the pattern, providing sample code and answering your many frequently asked questions.
Alistair Cockburn is an American computer scientist, known as one of the initiators of the agile movement in software development. He cosigned (with 16 others) the Manifesto for Agile Software Development.
Hexagonal Architecture has become one of the most common but misunderstood buzzwords within the software engineer business. Plenty of articles full of noise, many people packing somehow HA and DDD as it they were created to assess similar problems... I think they, both Alistair and Juan (RIP), have finally created the reference point to recommend anyone who ask you about Hexagonal Architecture topic.
Great introduction to the Ports & Adapters pattern
This book presents the Ports and Adapters pattern, including the history of the pattern, a series of examples written in both Java and Ruby, and a collection of articles Alistair previously wrote about the pattern. It’s both a great introduction to the pattern for anyone who is unfamiliar with it, and also a nice reference for people to keep close at hand when using the pattern.
However, one thing I didn’t realize about this book before I purchased it is that this is actually considered an early draft rather than the final draft. It sounds like Alistair plans on editing, rewriting, and updating the book over the next several months.
Also, as a minor nit: there is a typo in all of the Ruby examples throughout the book: the method on the tax calculator is named “tax_on� not “tax_rate� (tax_rate is the name of the method on the tax rate repository). So every example that calls “my_calculator.tax_rate(100)� should be “my_calculator.tax_on(100)� instead.
I decided to write my own review because there are not many reviews of this book. As for my rating, be aware that I was reading the pre-copyedit version, as I've brought it through the Kindle store. Overall, IMHO it should be more 3.6 than 4.
TLDR: It is a great introduction to Port&Adapter architecture. But if you already follow Alistair's work, then you can easily subtract one or two starts, as a big chunk of this book is "just" his articles.
The best introduction to Ports&Adapters/Hexagonal Architecture I found. Especially for someone who isn't familiar with work of Alistair Cockburn.
The pattern motivation and techniques are deeply described. Original articles regarding the pattern are included in the book. There's also very fruitful discussion regarding patters "Dependency Inversion Principle", "Dependency Injection", "Dependency Lookup" and "Inversion of Control".
Definitely worth the read as the book is short-to-medium size. Only the code samples could be better organized.