springMVC concept

1, a web request to complete the process

Web browser makes requests
the Web server receives the request and processes the request, and finally generate a response (typically html).
After processing the web server returns the content to the web client, the client processes the received content and displayed.
(Request-response mode)
 can be seen here, in the web, the web client is initiated the request, web server receives a processing request and generates a response. Web servers are generally not proactively notify clients to update Web content. Some technologies can help us to achieve this effect, such as server push (Comet), as well as in HTML5 websocket and so on.

2, MVC model (Model-View-Controller)

Is an architectural type model itself does not introduce new features, but will help us develop the code structure, the organization is more reasonable.

Model (Model)
            data model, provide data to show

View (view)
            is responsible for the display model, the general is that we see the user interface

Controller (Controller)
            receives a user request, for processing

 

Note: In the standard MVC, the model can push the initiative to update the data to the view, but in the Web development model can not be pushed to the view the initiative, because access to the Web is a request - response mode

 

. 3) webmvc
        the Web in which the MVC Model - View - concepts and standards as MVC controller concept, but a request - response mode (i.e., active data can not be pushed to the view).

 Before learning of us, in fact, the Servlet as Controller (Controller), the jsp as the View (view), the javabean as data Model (model) in, service layer as a Model (model) of behavior.

 

springMvc Overview:

1, it is SpringWebMVC abbreviation, SpringMVC is a module of the Spring Framework provides, the purpose is to simplify everyday Web development.

2, core components SpringMVC frame
        1.DispatcherServlet: front controller, sent by the client for filtering, processing logic requests want.
        2.Controller / Headler: controller / processor.
        3.HandlerMapping: processor mapper.
        4.HandlerAdaptor: processor adapter.
        5.ViewResolver: view resolver.

 

Guess you like

Origin www.cnblogs.com/wskb/p/10939464.html