[MUSIC]
What is Middleware?
The term middleware was first used in the field of distributed systems.
A distributed computing system consists of a collection of computers
that communicate and coordinate their actions by passing messages back and
forth to one another over a network.
So a web application is just a special case of a distributed computing system.
Let's take a look at where the services that provided in middleware
appear in our canonical web application architecture.
So middleware is basically the green
areas that I'm showing you here in our web application architecture.
So in this portion of the architecture,
we're concerned with the receipt of the request via the HTTP protocol.
Passing that request onto the scripts code and
other services that lie at the heart of your web application.
The processing of the request, which may involve interfacing with the data tier,
and finally, preparing the response that would be supplied
back to the user on the client side.
So, the point of middleware is to provide a set of services that do these things for
you, so that you, as a programmer, don't have to worry about the mundane
aspects of web applications, such as the web server and application server.
You want to focus on those aspects of the web application
that will set it apart from other applications.
So notice, by the way, that the model view controller design pattern is
implemented over the middleware.
All of the processes that I just mentioned are used by this design pattern.
So we'll spend some time later in this lesson understanding exactly how
the monoview controller design pattern uses middleware components.
So at a high level then, what is Middleware?
Well, you can think of it as the software glue that binds
together the set of services within the center of our web application architecture
that allows your application code to interact with the web server.
For this reason, people sometimes refer to it as the dash in the term client-server.
I should also mention that these services generally are not available as a part of
the underlying operating system.
In fact, that's why it's necessary to build middleware services.
Because of these services, processes running on different machines within
a distributed application can more easily communicate with one another.
So as a programmer, you don't need to dig into
all of the complexities associated with computers communicating over networks.
You just need to understand the interfaces provided by the middleware services.
In the next lecture, we'll start talking about some of the specific middleware
components in web applications.