Understanding DTO (Data Transfer Object) Pattern in 4 Minutes

preview_player
Показать описание
DTO (Data Transfer Object) Pattern is used to transfer the data between the client and server.

Data Transfer Object Design Pattern is a frequently used design pattern. It is basically used to pass data with multiple attributes in one shot from client to server, to avoid multiple calls to a remote server.

Another advantage of using DTOs on RESTful APIs written in Java (and on Spring Boot), is that they can help to hide implementation details of domain objects (JPA entities). Exposing entities through endpoints can become a security issue if we do not carefully handle what properties can be changed through what operations.
Рекомендации по теме
Комментарии
Автор

Thanks a lot! Your explanation is the best that I met in the internet

Anastasia-fiwv
Автор

Now it is clear. Earlier I used to think DTO and Objects are same. Thanks .

lovemishra
Автор

Perfect explanation👌, your videos are helping me a lot in my project, I can’t wait for the microservices course.

senya-man
Автор

Your video are awesome. Easy to understand and precise. They are my favorite. Please make a video on patch api

jbhatnagar
Автор

1. Not manadatory to use dot 2. But rather that providing whole object ( containing all fields like id, name, …imp details ), we convert object to a dot with limited fields from object 3. We achieve security

shubhamshende
Автор

So DTO has the same meaning as Model in MVC?

KhanhNguyen-gmhe
Автор

what is the difference between Facade design pattern DTO pattern?

kiranm
Автор

I feel showing this in code would be much better

GodofStories
Автор

It's unclear to me, you have aggregated three API Calls into one and returning the response,

What if client wants to fetch only organisation data then what ?

Also in dto sent from client can we mention what data we want and server will process that request and return the only data which was requested by client

RahulKumar-zfps
Автор

Hello sir,
Microservices course update please??

SumitKumar-ecnl