Assemble Your Components
In this chapter we showed how components work together. Starting a project with abstract structs rather than immediately into persistence give us some tangible benefits. The biggest one was having a bigger functional core and a smaller boundary. Building in persistence at that point allowed us to reduce coupling between the base OTP component and the database schema. To illustrate that benefit, we have implemented persistence as a straight path dependency.
Building MasteryPersistence with path dependencies let us isolate implementations into separate projects without the additional ceremony of maintaining separate repositories. Git and Hex dependencies offer their own trade-offs, providing reduced coupling at the cost ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access