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 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.