Add Persistence as a Boundary Service

In most Elixir projects, we inevitably begin our data layer with schemas and go from there. We tack on queries and services that use them to count, save, and summarize things. Ecto makes that much easy. What emerges might be a unified API, but it will be one that combines the issues of boundary and core. We, the authors know. We’re guilty of the same thing. The problem is that when we build software like this, we take on too much at once. Our software doesn’t get the benefits of the separation of concerns, and each reader of the code is doomed to deal with too much complexity at once.

This approach is not a functional one. In fact, we’re making a number of commitments, often from the first few hours of developments: ...

Get Designing Elixir Systems With OTP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.