Is it a good idea to use old fashioned repository pattern in an API implementing DDD?
Rather than using the repository pattern in th DDD way (in which case, a get method should directly return an hydrated domain model), we use repository a more classical way: a get method would return an ITO (stands for: Infra Transfer Object, which is a presenter of the retrieved data). The domain model is then hydated using one (or more) query.ies from repository.ies. The aim is to have more reusability of our repository methods, but is it really useful? Any thoughts or return of experience about this approch?
Aucun commentaire:
Enregistrer un commentaire