As far as I understand and use in projects,
- Service layer deals with business logic and might returns business entities
- Controller layer might deal with what it gets and outputs to the outer world (DTOs)
Like imagine a scenario where:
- A service might need to talk to another service, why they should deal with DTOs?
- You may have different api versions and controllers that would (may do some extra work) but also return different response shape based on new or different DTOs, so would it be wise to refactor (or even touch) service layer in that case to adapt to this change?