79679533

Date: 2025-06-25 19:00:07
Score: 1
Natty:
Report link

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?

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: amdev