Hey, in this video,
I'm going to give you an overview of the Spring Framework.
So, first off, here's the official website for Spring.
It's at www.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 early versions of J2EE.
And then also, we want to promote loose coupling
by making use of dependency injection.
So instead of hard wiring your objects together,
you simply specify the wiring via a 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.
This'll basically allow you to add
some applicationwide 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.
Now, this is kind of a 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 heartthrob, 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 reconfig. files
for setting properties, independencies
and also the Context here's really the Spring Container
that holds the Beans in memory.
And then there's SpEL,
that's for the Spring Expression Language,
so it's a little language we can use
within the config. files to refer to other Beans,
and we'll see example 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 applicationwide 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 communicating
with the database, either a relational database
or a NoSQL database.
And also, making use of, like, a message queue.
So on 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.