Access to Application Data
If you hide your ignorance, no one will hit you and you’ll never learn.
— Ray Bradbury, “Fahrenheit 451”
More than a decade ago, Eric Evans introduced Domain-driven Design (DDD), and one statement he made in his seminal book shook the pillars of software development. Essentially, he said that persistence should be the last—although not the least—concern of an architect in the design of the system. In this chapter, we’ll start from there to try to make sense of data access in modern web applications and to develop a relatively generic pattern for an effective application back end. Persistence is clearly part of the application back end and, regardless of the abstraction layer you intend to have on top, persistence ...