Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

For many cases, we don’t do these kind of things in Java; a single annotated record can function as a model for both data and API layers. Regardless of the language, the distinction becomes important when these layers diverge or there’s some sensitive data involved.


Even when DTO is separate, you can use projection methods of eg: spring data JPA, or something like mapstruct.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: