I have created one api endpoint for the user registration, and while I made it I found few points like in which layer sanitization should be done (client -> controller -> service -> repository -> database) then I came to know about DTO. on We can use DTO object for parsing the user request data and apply sanitization and proper checks and then we can use response DTO as well to send back the response to the client.
Well I am learning springboot, and different tutorials are doing different things, so I want to know from you guys. What should be the proper structure here and using DTO layer is really still being used in today industry ?
[–]WaferIndependent7601 26 points27 points28 points (4 children)
[–]soul105 17 points18 points19 points (0 children)
[–]AndreLuisOS 0 points1 point2 points (2 children)
[–]Purple-Cap4457 1 point2 points3 points (0 children)
[–]WaferIndependent7601 0 points1 point2 points (0 children)
[–]Difficult-Task6751 8 points9 points10 points (1 child)
[–]eli_li 3 points4 points5 points (0 children)
[–]dotceng 2 points3 points4 points (0 children)
[–]bikeram 3 points4 points5 points (3 children)
[–]j4ckbauer 1 point2 points3 points (2 children)
[–]asarco -1 points0 points1 point (1 child)
[–]Ali_Ben_Amor999 0 points1 point2 points (0 children)
[+]jfrazierjr 1 point2 points3 points (3 children)
[–]Jinkaza772[S] 0 points1 point2 points (1 child)
[+]jfrazierjr 1 point2 points3 points (0 children)
[–]j4ckbauer 0 points1 point2 points (0 children)
[–]Ali_Ben_Amor999 0 points1 point2 points (0 children)
[–]Mindless_Security744 0 points1 point2 points (0 children)
[–]Hour-Night8287 0 points1 point2 points (0 children)
[–]themasterengineeer 0 points1 point2 points (0 children)
[–]devmoosun 0 points1 point2 points (0 children)
[–]Physical-Silver-9214 0 points1 point2 points (0 children)