Thursday, November 24, 2011

What is Spring MVC Architecture

As I mentioned earlier, Spring has a MVC architecture which make the Spring a high performance framework comparing to others. in the MVC architecture of Spring, there are important parts to be noted as dispatcher Servlet, handler mapping, view resolver & views. The abstract communication between these components is as follows. the communication steps are as follows.

 1. The user request is received by the dispatcher servlet. This dispatcher servlet is the key for mapping the resources to the correct requests. It contains xml mapping codes defining each resource with the path to the resource. 
2. Then the dispatcher servlet will invoke the controller for the request. 
3. The Controller process the request by calling the appropriate service methods and returns a ModeAndView object to the DispatcherServlet. The ModeAndView object contains the model data and the view name.
 4. The DispatcherServlet sends the view name to a ViewResolver to find the actual View to invoke. 
5. Now the DispatcherServlet will pass the model object to the View to render the result & the View with the help of the model data will render the result back to the user.

2 comments:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java EE Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.



    Java Online Training

    ReplyDelete