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.
___
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.
___
A model contains the data of the application. A data can be a single object or a collection of objects.
A view represents the provided information in a particular format. Generally, JSP+JSTL is used to create a view page.
A controller contains the business logic of an application. Here, the @Controller annotation is used to mark the class as the controller.
___
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
Spring framework provides templates for JDBC, Hibernate, JPA etc. technologies. So there is no need to write too much code. It hides the basic steps of these technologies.
The Spring applications are loosely coupled because of dependency injection.
The Dependency Injection makes easier to test the application. The EJB or Struts application require server to run the application but Spring framework doesn’t require server.
Spring framework is lightweight because of its POJO implementation. The Spring Framework doesn’t force the programmer to inherit any class or implement any interface. That is why it is said noninvasive.
The Dependency Injection feature of Spring Framework and it support to various frameworks makes the easy development of JavaEE application.
It provides powerful abstraction to JavaEE specifications such as JMS, JDBC, JPA and JTA.
It provides declarative support for caching, validation, transactions and formatting. ___ MVC patterns separate the input, processing, and output of an application.
Every framework has its own importance. In the case of Spring MVC it is that rapid and parallel development can be done which saves more time.