Тёмный

[QUESTION] What is a DTO and how should I use it? 

Laur Spilca
Подписаться 24 тыс.
Просмотров 10 тыс.
50% 1

In this video, we discuss what Data Transfer Objects (DTOs) are and how should you use them.
Code on GitHub: github.com/lsp...

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@radub6436
@radub6436 4 года назад
This channel has the most comprehensive videos about the java language!
@abhishekr9829
@abhishekr9829 3 года назад
Thank you for the video, I was looking for DTO and it helped me a lot.
@sky2721
@sky2721 4 года назад
I think you should make the playlist about design pattern later in the future :D.. nice video anyway...
@laurspilca
@laurspilca 4 года назад
Thanks! Good advice. I made a note!
@lts8683
@lts8683 4 года назад
@@laurspilca + solid principal thanks you
@StefanBanu
@StefanBanu 3 года назад
I want this topic too. 😊
@madastan4169
@madastan4169 3 года назад
It isn`t better to import Product class as a jar?
@laurspilca
@laurspilca 3 года назад
Hi. Thanks for the question. I'm not sure I understand your question, but I guess you meant if you have two apps create a separate JAR containing the DTO and import it in the other two. If this is the case, the answer is: "It depends". Sometimes you can't do this, for example, if the two apps are not both part of your organization. In other cases, developers prefer avoiding to complicate the deployment (which might also make sense if there's not so much duplication) and so on. Like almost everything else in software, the right decision depends on the specific case. I hope I answered your question :)
@Seff2
@Seff2 Год назад
I could not follow this tutorial. Too confusing. Why are there two Services? Couldn you just call the endpoints with Postman?
@laurspilca
@laurspilca Год назад
Hi. The reason there're two services is to make the point of what a DTO is. By definition DTO = Data Transfer Object. The reason you have the "transfer" word there is because it helps transferring data between apps. Yes, of course, one can assume Postman is the other app, but to make it more realistic, I preferred to have two services. I hope it makes sense. Cheers!
@anil2009
@anil2009 4 года назад
Is this the start of microservices sir??
@laurspilca
@laurspilca 4 года назад
Hi. No, not yet. I just answered a question asked by someone. When I'll start with the software architecture part I'll make a stream with numbered lessons so that it's easy for everyone to follow them :)
@madastan4169
@madastan4169 3 года назад
You should use meaningful names. Also, the logic should be in a service class. Regarding the package naming and the controller name, you should use nouns which are at their singular form.
@laurspilca
@laurspilca 3 года назад
Hi Mada. I agree with you. But what does this have to do with DTOs, which is the topic discussed?
Далее
Using DTOs with JPA
1:05:34
Просмотров 7 тыс.
Шок-контент! 😱
00:50
Просмотров 2 млн
Why do we use DTOs in our APIs?
26:15
Просмотров 9 тыс.
JAVA DTO Pattern Tutorial | Simplify Your Code
19:12
Просмотров 208 тыс.
Spring Data JPA from 0-100 in 60 minutes
1:02:31
Просмотров 81 тыс.
Microservices with Databases can be challenging...
20:52
DTO (Data Transfer Object) in JavaScript/Typescript
10:06