It is suggested to divide the application according to MVC architecture. and that is how I have divided my application too.
Controller handles the user request , then it calls the service layer (the layer where you code the business logic) and in turn service layer communicates to model for DB related stuff and it returns back to controller and renders the view.
I want to know how do you guys handle this when it's a AJAX request. I am using DWR AJAX framework.
Javascript calls to Service Layer directly OR you create a
Java class that is equivalent to controller? so that the flow become , JavaScript <-> Controller (different class then the other controller) <-> Service class <-> Model
It is important for me to decide while finalizing the architecture before I jump into coding.