What is Spring Framework? How is it different from Spring Boot?

Madhuresh Gupta
Quick Code
Published in
2 min readAug 3, 2020

--

Hello everyone! Today I will be explaining Java’s one of the most famous framework — Spring Framework. Most people often confuse it with Spring boot (which I will talk about in the later part of the blog) and use it interchangeably. Let me first make it clear — these are not competing against each other, rather it’s the user’s requirements where we make a choice to use either.

So what is Spring?

Well in simple terms it is a Java Framework (if you want to more about what is a framework click here) which has many features on top of Java to create enterprise applications which can be configured for any kind of deployment. It was this framework which came out with the concept of dependency injection and made writing unit and integration tests for frameworks possible. Thus now the java applications were testable.

This framework is like the building block for your application where you need to provide all the configurations and specify all the dependencies required. Also it is easy to integrate with other frameworks as well like Hibernate and Struts.

What about Spring Boot?

Now there was a big problem with the Spring framework which was regarding configurations. Look when we are working on any project, our focus needs to meet the business requirements and not figure out the configurations, dependencies and environment setup. To overcome this problem we have Spring boot.

It is built on Spring framework but comes with a whole bunch of boiler plate configurations and codes which makes getting an app into production a lot faster and easier for developers.

So a spring boot is made on top of spring framework. Thus like for example if you want to make a web application, then in Spring we need to install a separate web server and then do all the configurations, create a .jar file. But Spring boot has this spring-boot-starter-web which has a web server in-built and configured ready to be installed, all we need to do now is write our business logic and in no time your app can go into production thereby eliminating the friction of setting up everything from scratch and focusing more on writing the code for our webapp.

--

--

Madhuresh Gupta
Quick Code

Follows Microsoft, Tesla Motors, SpaceX, Google, Elon Musk. Aviation Admirer!