Hi Maxi, thanks for sharing your though on the subject. I have to say, I do not agree with your analysis on the DTOs for the following reason: 1) In the list of Problems you mention the following
I will not comment on every point of your assumptions as I believe their were listed based on an wrong use of the DTOs.
My point is DTOs are predifined tuples. No logic. Just a tool to define a projection of your famous "object". If you start adding logic on them then I guess you are building something closer to a Value object or ADTs in FP. When building API (Not limited to inter system api but also apis for other "objects" they are pretty handy to structure this API.
thanks again for sharing your view.
Alex.
Hi Maxi Contieri, indeed, I guess your point make sense in this particular programming paradigm. I can understand your point when talking about Employee class, EmployeeDTO, EmployeeDAO and in a classic OO multi tier application. Functional Programming have a different usage of DTOs and serve at the foundation of their Algebraic Data Types. They are no code smell at all in this context :p