Understanding DTOs and entities in Spring Boot

preview_player
Показать описание
Is it okay for your web controllers to return entity classes from the data access layer? Or should you decouple things using DTOs (data transfer objects)?

What are the tradeoffs? Does it really matter?

Find out in this live stream where Greg, principal developer on the Spring teams examines what's at stake and what impact it could have on your application.

====
====

ALSO SEE: 👀

LIVE CODING: 💖

RESOURCES: 👇

GET MORE: 🎉

COFFEE:

Got questions or suggestions for future topics? Drop ‘em in the comments!

STUFF I LIKE TO USE: 😍

DISCLOSURE: All opinions stated here are mine and do not necessarily reflect those of the Spring team nor of my employer. Any usage of "Spring", "Spring Boot", "Spring Framework", "VMware", "Pivotal", or anything else is completely unaffiliated with its owners. From time to time, I may post affiliate links for products I enjoy using.

#springbootlearning

© 2021 Greg L. Turnquist, All Rights Reserved
Рекомендации по теме
Комментарии
Автор

Hi Greg,
came here while was reading your book Spring Boot 3.0.
There was a link in the Querying for Data chapter.
Both a book and the video are great.
Thank for your effort making our life simpler.
By the way, the background music is amazing :)

Alexander-ftpt
Автор

The music is extremely relaxing too, its like a therapy session

hendrx
Автор

Hey man, just wanna say a huge thank you. Your explanations and additional details with context make it much easier to understand. Sending love from Australia

xixReact
Автор

There is a problem with the stream. Probsbly a bg photo showing up every few secs. E.g 15:51

orhn
Автор

Hi Greg, nice video!
Going forward with these examples, how would you map the other way around? Lets say an EmployeDTO comes in from a post request and you want to convert it to Employee entity? Where would you put this 'mapping' ?

chopsuey
Автор

Sorry I do not understand the advantage of DTO vs entity. Could you explain a bit further?

domlee
Автор

The image flashing gave me a bit of a headache but thanks a lot, this explanation was great even for me as a beginner

hendrx
Автор

Now I start to believe software design is art.

michaeldeng
Автор

Wow your monitor is huge, what is it?

kamalhm-dev
Автор

just started watching this, but so far it's difficult to hear you talking over the background music; the music is too loud/distracting

shortestpath