posted 10 years ago
I am trying to build a small web application to manage my clients data and issue invoices using Spring and Hibernate. After reading a book on Spring MVC, hibernate and few articles I noticed many recommending to follow the (Domain, DAO and Service layers) model.
So I was wondering if this is really the best practice? and if yes, I am wondering what type of methods should be inside each layer (Domain, DAO and Service)?
I also read that DAO layer is responsible for managing connection to DB, but since I am using Hibernate, then I can't figure what type of methods I will need to add in DAO layer?
Also I've read that Service layer is responsible for executing (calling) DAO and domain layer methods, so I was wondering if this is the main job of service layer?
I am sorry if my questions are dummy, I am new to this world so please excuse my ignorance
Thanks for your time