Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 182

Comment by Filip Milovanović on Repository interfaces returning DTO in clean architecture used by query handlers

$
0
0
"This means that repository interfaces for query handlers cannot be in the Domain layer" - no, I would rather say this means that DTO-returning services aren't repositories as DDD envisioned them. A repo is supposed to provide you with initial access to a domain object or an aggregate you cannot otherwise navigate to, and the querying/mapping happens under the hood. There's some friction here when you're using an ORM, so in practice, teams often end up with database-centric code, and treat ORM entities as (anemic) domain objects. Not an unreasonable thing to do, but has its drawbacks.

Viewing all articles
Browse latest Browse all 182

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>