Process and Stateness are they object?

This is why in DDD there is the concept of a repository:

Repository: A mechanism for encapsulating storage, retrieval, and search behavior which emulates a collection of objects.

So while everybody is talking about Ecto’s “repo” - in the DDD sense that is not your application’s repository because Ecto’s repo is leaking all sorts of implementation details about the storage technology (RDBMS and schema details) that are irrelevant to the application’s domain. The application repository would have to wrap Ecto’s repo and “talk” to the rest of the application only in terms of the domain’s types.

Now for smaller projects this effort may not be worth it.

2 Likes