title: SpringMVC lifecycle-- the overall view
body: <p>I'm way new to Spring. </p>
  
  <p>I am looking to verify the following understanding of SpringMVC lifecycle-- to put things into places in the overall view: </p>
  
  <p>The entire process is request-driven.</p>
  
  <p>There is a <a href="http://en.wikipedia.org/wiki/Front_Controller_pattern">Front Controller pattern</a> and the Front Controller in Spring MVC is <a href="http://docs.spring.io/spring/docs/2.5.6/api/org/springframework/web/servlet/DispatcherServlet.html">DispatcherServlet</a>. </p>
  
  <p>Upon every incoming request from the user, Spring manages the 
  entire life cycle as described in <a href="http://eiconsulting.blogspot.com/2011/09/web-application-development-using.html">here</a>. </p>
  
  <p>In the overall view, <a href="http://docs.spring.io/spring/docs/2.5.6/api/org/springframework/web/servlet/DispatcherServlet.html">DispatcherServlet</a> dispatches the request to a controller for a service at the back-end. 
  Once this is done, it hands it in to the View component of MVC for its view to be prepared in response to the user. </p>
  
  <p>In more detail, </p>
  
  <ul>
  <li><p><a href="http://eiconsulting.blogspot.com/2011/09/web-application-development-using.html">DispatcherServlet</a> uses Handlers to decide "which controller" to serve that request.  </p></li>
  <li><p>The controllers are/should be "light-weighted"-- should be decoupled from 
  the service processes at back end as a good design practice-- they hold references to the service(s) and invoke the right one(s). 
  Their "mission" is to control the service process(es) for building the model and handing 
  it back to the dispatcher for the next step. </p></li>
  <li><p>The View component in itself has 2 parts: first the ViewResolver picks the right type of look for View to put the model into the final format for the user. </p></li>
  </ul>
  
  <p>From the developer's angle-- the DispatcherServlet is a behind-the-scenes thing. 
  All i do is to define, and configure it, if necessary, in web.xml.
  As the developer, I instantiate an ApplicationContext (there are many ApplicationContext types-- i pick one depending on what i need, typically the 
  WebApplicationContext(?) ). AplicationContext is the factory that creates all the servlets/beans including 
  the DispatcherServlet, using their descriptions in the .xml files. The DispatcherServlet then runs behind the scenes and manages the 
  entire process-- goes&amp;gets the controllers, using the annotations or the their .xml descriptions, 
  views, handlers, validators etc. </p>
  
  <p>I am wondering whether this description is holds-- valid&amp;complete, and whether there are big missing pieces in it.</p>
  
  <p>Thanks in advance. </p>