This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
Suppose I am developing a simple jsp-servlet application for manage customer information. So i want to know what would be the best package structure and how controllers should be there in this case.
So the main actions would be insert, edit, delete and view customers in this case.
I thought of having a one controller called MainController for identify those 4 actions.
Or else should i need to have 4 controllers for each action?
One DAO class called CustomerDao for manage all database related stuff
One DTO class called Customer for transfer customer data and Util class for common actions
But i am confuse here what should i need to have under domain. Does under domain where the business logic should reside. Though this application is simple enough, is it correct to have class for example like ManageCustomer which call the necessary DAO action. The controller shouldn't need to directly call the DAO right? It should go across domain and domain access DAO right. I am correct here?
But what i believe correct is that business related logic's belongs to a class under a package something like service right? If so what should domain classes do?