News for hackers. Stuff that matters.
Re:Show HN: Mapperly – A .NET source generator for object to... by f8o on Thursday January 12, 2023 @07:51PM (#34362527)
A simple set of dtos in the application layer, defined around their respective application services (use cases if you will) is ok. Required for most bounded contexts/microservices. You properly organize application and domain layers. It does not need to be verbose. The problem is when people define dtos on the http infrastructure, then similar dtos on the app layer, domain models (often with all attributes being public and behavior scattered elsewhere), then dtos for database schemas... AutoMapper looks useful in these scenarios, but it's the wrong solution for poor design.

While manual handling is required when you have proper domain models with controlled creation and change operations, these tools can be useful for other matters.

There are no comments on this comment yet.