mercredi 25 novembre 2020

DTO is really needed for Create / Update Domain?

Well, I've heard many times that we need to use DTO pattern to reduce the resource and decouple between client and server.

I totally agree with the necessity of DTOs for fetching data to clients since we don't need to fetch a fridge to get bread, so it completely makes sense.

But when it comes to creating or updating a domain, we probably need to write massive boilerplates since the data structure between Domain and DTO would be almost the same.

So here is the question, Do we really need to write a DTO for updating / deleting a domain?

Aucun commentaire:

Enregistrer un commentaire