currently I'm learning the SpringMVC + Hibernate. And I'm confused while implementing a simple user account manager application.
In my case:
- the user account should be read from the database;
- the password should be compared before any modification;
- the user account information should be modified according to the frontend form;
- the user account with new information should be save back to the database;
My questions are:
- Should this whole process be implemented in the Service or in the Controller? And why?
- In many examples I read that the service methods are usually tiny and contains only one DAO call, is this a good practice? Or we do the contrast to put several DAO calls into one service methods?