The World Is a Service

Once you get used to the idea of having adapters mediate access between your application and external services, it’s not that far a leap to have adapters internally to mediate between different parts of your application. This approach is sometimes called hexagonal architecture, and there are many, many resources online describing hexagonal architecture as it applies to Rails (such as http://victorsavkin.com/post/42542190528/hexagonal-architecture-for-rails-developers). At the same time you can find many, many resources online saying that hexagonal architecture is an awful idea. (David Heinemeier Hansson is a particularly vocal critic.)

We’ve taken baby steps in this direction by creating action objects such as CreatesProject ...

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.