Welcome back! In the step, will get the big picture of Spring Boot. What are the goals,
What's Spring Boot is not and what are the features. Today world moving toward Micro Services
Instead of developing large monolithic applications.
We're building a lot of micro services.
So instead of building one big application, we are building 20-25 maybe 50 smaller micro services.
One of the important things with these micro services is you would want to be able to build them quickly.
That's where Spring Boot comes in.
In the last couple of years Spring Boot has gained a lot of ground.
It has quickly become the number one framework to develop micro services in the Java world.
How did sping boot achieved this?
That's where we would discuss about the goals and the important features.
What are the most important goals of Spring Boot.
The most important goal of Spring Boot is to enable building production ready applications quickly.
The other important goal is to provide all the common non functional features. embedded servers, metrics
health checks and externalised configuration.
We'll talk about these features a little later.
These are the two important goals of Spring Boot - A) To enable you to quickly build applications and also provide
common non functional features.
Before we go more in depth into Spring Boot you also need to understand what Spring Boot is not. What
Spring Boot is
not is there is no code generation at all.
Some of the people call Spring Boot as a code generation framework. Actually Spring Boot does zero code
generation and that's what makes this concept really great.
The second thing, Spring Boot is neither an application not a web. Spring Boot
provides great integration with embedded servers like Tomcat, Jetty but by itself Spring Boot is not a web
server.
It's not a application server. These are two things that you would need to remember.
There is no code generation in Spring Boot and Spring Boot is neither an application server nor a web
server.
Now that we understood the goals and also understood what Spring Boot is not.
Let's look at how Spring Boot achieved these things.
The most important part of Spring Boot is this concept called Starter projects.
Consider example of developing a web application.
If let's say I want to develop a web application I would need Spring MVC.
I would need Spring core.
I would need some validation framework.
I would need some logging framework. In addition to that, I would need to configure all this stuff that
is needed.
For example, if I'm using Spring MVC, I would need to configure dispatcher servlet. I would need to configure
view resolveser and a lot of things like that. However, with Spring Boot starter project
it becomes very easy.
All that you need to do is to add a starter called Spring boot starter web into your project and that's
it. You'll get to Spring MVC for free.
You get Spring core for free.
You get a validation framework for free and also a logging framework for free.
Similarly, for JPA there is a starter called Spring Boot starter JPA.
Once we use this starter.
You would not only get JPA but also a default implementation of JPA with Hibernate and also auto
configuration of that.
So you would not need to worry about the framework part and you can directly start creating your entities.
Another important feature we already talked about is embedded servers.
Let's say I am developing a web application I would want to deploy it on to a Linux box.
In the olden days the way it used to work is first I would need to install the Linux box.
Then I would install java on it and then I would need to install a web server. So I would need to install either
Tomcat, weblogic or webspher and then I would take my application war and deploy it.
This is the usual way we use to deploy stuff. With Spring Boot, comes a concept called embedded
server. What you can do is you can package your server. So you can package Tomcat along with your
application jar. So I can include the Tomcat server in my application jar. So I don't need to install it
on the Linux box.
So all that I need to do, on the Linux box is if I have Java installed that's sufficient.
I can go ahead and run my application.
I don't need any other server installed on the linux box. In the world of Micro services,
this makes a huge difference.
And also, Spring Boot provides a number of production ready features. Spring Boot provides monitoring
for your application through something called Spring Boot actuator.
For example, you can find out how many times a particular service is called. You can find out how many times a particular
service failed and also you can check whether the application is up and running or not.
All these features come built in.
And another important feature that Spring Boot provide is externalised configuration. The configuration
of applications varies between different environments. Your configuration from dev different from your
configuration in production.
Spring Boot provides these features built in.
You can simply create property files matching a simple naming convention and that's it. You're ready
with externalised configuration. Spring Boot also provides support for different profiles.
These are some of the important goals and features of Spring Boot.
The idea behind this step is to understand the big picture of Spring Boot. What it is, what it is not
and what are the important features. In the next steps, we will dig deeper into each one of these things.
Until the next step, bye-bye.