what is the difference between Spring and Spring MVC framework

JavaSpringSpring Mvc

Java Problem Overview


I am new to Spring. Can any one let me know what is the difference between Spring and Spring MVC Framework ?

Java Solutions


Solution 1 - Java

Spring is a big framework, that contains a lot of components. One of these components is Spring MVC - it is a component that lets you implement your web application according to the model-view-controller design pattern.

Solution 2 - Java

1- Spring in abstract word is a framework

> The Spring Framework is an open source application framework and inversion of control container for the Java platform.

Check this links for more information:

Spring Framework

Framework vs. Toolkit vs. Library

2- MVC architecture

it is an architecture that help the developer to separate the building block of web application.

> Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications

check this link for more information: Basic MVC Architecture

Solution 3 - Java

MVC is a Spring module. You use it for designing web applications. MVC in Spring implements the front controller design pattern. In your web.xml you'll define a single servlet (DispatcherServlet) and all your requests will pass through it and will be attended by Controllers you will define (@Controller).

Solution 4 - Java

Spring is a framework which helps to connect different components together. There are many modules for IOC, AOP, Web MVC etc.Spring Framework is an open source application framework and inversion of control container for the Java platform.

Spring MVC (Model–view–controller) is one component within the whole Spring Framework, to support development of web applications.

Solution 5 - Java

Spring MVC is one component within the whole Spring Framework, to support development of web applications. You can use any web containers, so it works fine with Tomcat. Just think that Spring is a third party library. You just need to put the necessary jar files in the lib directory, and define a few xml files.

So basically when you just say Spring it is a just a framework. And by framework I mean lot of functionalities/jars. Like you may have core which has core functionality or aspectj etc. Spring MVC i.e model view controller is one such functionality offered by Spring framework. You can deffer processing of request to various controllers based on the pattern of URL requested. You can refer

Spring MVC hello world example

Solution 6 - Java

Spring framework can be visualized as an alternative to, replacement for, or even addition to the Enterprise JavaBeans (EJB) model as mentioned here. That means a framework to develop distributed, scalable, secured, transactional application.

Spring MVC can be thought of as an replacement to Struts, Stripes, Tapestry etc, i.e. Presentation layer framework.

Spring framework is the super set of Spring MVC.

Solution 7 - Java

Spring

An umbrella term to denote various projects, one of which is Spring Framework.


Spring MVC

The Spring Framework project has several features. One of them is Spring MVC.

Features of Spring Framework are -


So, the Spring MVC feature allows developers to build applications following Model-view-controller design pattern using Spring Framework.


Other Spring projects

And many other projects.


NOTE

Spring, Spring Framework and Spring MVC these terms are often used interchangeably among developers which sometimes creates confusion for people who already don't know the details.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNaveenView Question on Stackoverflow
Solution 1 - JavaMichal KrasnyView Answer on Stackoverflow
Solution 2 - JavaSalmanView Answer on Stackoverflow
Solution 3 - Javauser3149983View Answer on Stackoverflow
Solution 4 - JavaSardor I.View Answer on Stackoverflow
Solution 5 - JavaAniket ThakurView Answer on Stackoverflow
Solution 6 - JavaDexterView Answer on Stackoverflow
Solution 7 - JavaMinar MahmudView Answer on Stackoverflow