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.