I'm following several guides and tutorials to learn how to use Spring Boot framework, also I've red some articles about MVC and DAO design pattern, but the information is kind of ambiguous, some of the examples use the class "serviceObject" to access methods in the class "repositoryObject", others just make use the "repositoryObject" class directly, I've seen even tutorials where people creates a new interface for the object and the same time creating an implementation of JPARepository or any other Repository, so I would like to know from you guys, the experienced, how should I implement the design pattern? What's the correct form of using the framework?
By the other side some days ago I found out that Entities and DTO are not the same and that they are meant to different uses, Entities will handle the data transaction between logic layer and business layer to database, but DTO will be in charge of what information is shown in the frontend, that's what I understand but I have my doubts, and if it's that way how should be implemented this?
So I kindly request you, can you please explain me these concepts in a way that a kid can understand (apples and a board, a student table with id, name and age maybe)?
By the way I'm doing a practice project that it's: Data JPA, Web, Thymeleaf <- (Still don't understand very well what this is for, but in the practice I will learn).
Thank you in advance.