Instructor: Hey, in this video I'm gonna give you
an overview of the Spring Framework.
So, first off, here's the official website for Spring,
it's at spring.io,
so this is where you can get all the documentation
for Spring, you can download Spring,
you can look at some tutorials
and also some Getting Started guides,
and we'll use this website a lot during this course.
So, why Spring, and I covered this in the last video,
but again, in a nutshell,
it's to simplify Java Enterprise Development,
make it much simpler than what we had in J2EE or Java EE,
and I gave all the pros and cons for that
in the previous video.
So, here let's kind of drill down a bit
and talk about the goals of Spring, like what are the goals?
Well first off, lightweight development with Java POJOs,
and POJOs mean Plain Old Java Objects,
make it much simpler to build as compared to
the heavyweight EJBs from the earlier versions of J2EE.
And then also we want to promote loose coupling
by making use of dependency of injection,
so instead of hardwiring your objects together,
you simply specify the wiring via configuration file,
or annotations, and we'll cover that a lot in this course.
Then the next idea is declarative programming
with Aspect Oriented Programming or AOP,
so basically allow you to add some application-wide services
to your given objects.
And then finally the main thing here
is to minimize boilerplate Java code,
so in the early days of J2EE,
there was a lot of code that you had to write,
and so the folks at Spring, they created a collection
of helper classes to make it easier,
and again to minimize all of the boilerplate code,
and we'll see some examples of that
a little later in the course.
So, that's pretty much it in a nutshell,
those are the goals of Spring,
lightweight, dependency of injection, AOP,
and minimizing boilerplate code.
Now, this is kind of the big picture here
of the Spring Framework,
and this is kind of like the core framework,
and what I'll do is I'll actually go through
these various sections here,
and just give you a quick overview
as far as what they're about.
Alright, so let's go ahead and start here
with the Core Container,
so the Core Container's like the heart throb,
the main, I guess the main item here of Spring,
so basically it manages how beans are created,
it has a bean factory for creating the beans,
it basically can read config files
for saving properties and dependencies,
and also the context here is really the Spring container
that holds the beans in memory.
And then there's SpEL,
that's for the Spring Expression Language,
and it's a little language we can use
within the config files to refer to other beans,
and we'll see examples of that later,
but that's kind of the Core Container for creating beans
and then making those beans available.
So let's move over to the AOP section,
so, this is where you have support
for Aspect Oriented Programming,
so basically what AOP, in a nutshell,
it allows you to create these application-wide services
like logging, security, transactions, instrumentation,
and then you can apply these services
to your objects in a declarative fashion,
so no need to modify your code to have support for this,
you simply add a config in the config file or an annotation,
and that service will be applied to your application,
and we'll see examples of this,
primarily when we get into some transaction work,
but some other areas too, we'll play around with it a bit.
So then, moving forward here,
let's take a look at the Data Access Section or Integration,
so basically here,
this is for like communicating with the database,
either a relational database or a NoSQL database,
and also making use of like a message queue.
So in the top left you have JDBC,
basically Spring provides some helper classes
to make it much easier to access a database using JDBC,
and by using these Spring JDBC classes,
you can actually reduce your source code by over 50%,
so a lot of good helper classes there.
The next little bullet there is ORM,
for Object to Relational Mapping,
this is probably the most popular section
of this module here,
basically it allows you to hook into Hibernate,
or hook into JPAs, a lot of support
and a lot of synergy between Spring and Hibernate.