Technical-paper

MVC (Spring MVC)

Abstract :

The MVC architecture was developed to make development of web applications in rapid and parallel manner. If an MVC model is used to develop any particular web application then it is possible that the application can be developed three times faster than normal development. This is possible because the Model, View and Controller can be developed by three developers parallely at the same time. ___

Introduction :

Model–view–controller (MVC) is a software design pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. ___

Model , View , Controller :

Model :

A model contains the data of the application. A data can be a single object or a collection of objects.

View :

A view represents the provided information in a particular format. Generally, JSP+JSTL is used to create a view page.

Controller :

A controller contains the business logic of an application. Here, the @Controller annotation is used to mark the class as the controller. Image ___

Spring MVC :

A Spring MVC is a Java framework which is used to build web applications. It also follows the Model-View-Controller design pattern. It implements all the basic features of a core spring framework like Inversion of Control, Dependency Injection. A Spring MVC provides an elegant solution to use MVC in spring framework by the help of DispatcherServlet. Here, DispatcherServlet is a class that receives the incoming request and maps it to the right resource such as controllers, models, and views..

In the image given below the Front Controller represents the Dispatcher Servelet and the process happening in the Spring MVC can be understood easily by viewing it

Image

Process behind the scenes :