Abhishek, I agree with you that MVC is the better answer.
Front Controller's main purpose is to centralize the common business logic. But not all of the business logic is common and so it needs to go somewhere. To completely keep the business logic out of the views, we still need more classes to hold the business logic that isn't common.
A good choice for the extra business logic is the Command pattern. HFSJ page 739 illustrates how this is done using Struts (Action objects follow the Command pattern). After putting all this together, you pat yourself on the back and realize that you've also implemented the MVC pattern.
Oh. How did that happen?
The MVC pattern's entire purpose is the separation of concerns. Basically, if you separated business logic from views (and didn't do anything goofy with your Model to break MVC), you've more than likely implemented MVC.
Bottom line, Front Controller by itself does not separate business logic from the views.
By the way, Abhishek, please check out the JavaRanch Naming Policy and update your display name accordingly. Thanks.
A good workman is known by his tools.
posted 11 years ago
Front Controller's main purpose is to centralize the common business logic. But not all of the business logic is common and so it needs to go somewhere.
I disagree, in my opinon Front Controller is not meant for implementing any business logic, it actually controls the flow of your application and delegates the request to appropriate handler, which can further call the appropriate business handlers.
So it actually is a layer between the view and our business layer