Free views, likes and subscribers at YouTube. Now!
Get Free YouTube Subscribers, Views and Likes

DTO for Request u0026 Response Payloads - Fullstack Web App 003 - Java Quarkus MongoDB ReactJS

Follow
Paulo Chaves

The DTO Pattern (Data Transfer Object) allows us to create a representation of a domain object better optimized for clients. With a DTO the data can be parsed in a way that is compatible with a client and data that is not intended to be present in the response/request can also be removed/ignored. This is the case here where a DTO is gonna be used to ignore some fields when parsing the request to create/update a transaction. When returning a response the DTO will change the id from an ObjectID to a hex string which is humanreadable and what the client expects.

posted by estascatstq