Ram ank wrote:my question is cant we integrate controller and model to be in same module
i.e use same technology like servlets for both.
lets say it is spring MVC
I actually missed that the question started with "why"
Why do we separate anything in Java, we can create just one class with one method and write all our code in that one method. But it is not good OO design, it will cost way too much to maintain that type of code. We separate concerns, so Model is a concern about holding the data of the application. Where the concern for a Controller is passing those data between the back end, say database, and the front end UI. Any coupling between them makes code more brittle and tough to enhance and maintain.