Chapter 12Persistence
Throughout this book, we’ve designed our domain models to be “persistence-ignorant”—not letting the design be distorted by implementation issues associated with storing data or interacting with other services.
But there comes a point in most applications where we have state that needs to last longer than the lifetime of a process or workflow. At this point, we need to turn to some sort of persistence mechanism such as a file system or database. Sadly, there’s almost always a mismatch when moving from our perfect domain to the messy world of infrastructure.
This chapter aims to help you deal with the issues associated with persisting a domain-driven data model. We’ll start by discussing some high-level principles, such ...
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