Domain Driven Design series: Persistance Ignorance
Persistence Ignoring? You mean we must ignore the storing information in the system? No way!! No, it is not what the DDD means. In DDD, we talk just about the domain. How the behavior of the business object in term of domain. Of course there is still data access activity, but not in domain layer. Domain layer do not care about other layer, domain layer no need to know about how other layer works.
Then how do the object access the database? There is infrastructure layer who responsible to access the database. What kind of class residing in the infrastructure layer? In DDD, we call it Repository class. Repository will provide the access to database via the interface. In the domain layar, the domain object can use the interface to interact with database.
references:
Charlton, C.(2009). Domain Driven Design: Step by Step Guide
R.B.(2009).DDD Training Material