Hi there, this is Scott
Duffy from SoftArchitect.ca
and I want to address sort of one
of the most fundamental questions
that comes up from time to time,
what is an n-tier architecture?
It's kind of a funny term
and maybe if you haven't
encountered it before
it doesn't intuitive
exactly what it means.
The N in n-tier architecture
just represents any number.
Okay, sometimes it's called
a three-tier architecture
or a two-tier architecture
but the n-tier architecture
means it can be any number of tiers.
Now, what's a tier?
A tier in software architecture
is a boundary between a
layer of the application.
So, you've got the presentation layer,
you can have a business layer
and you can have the data layer
and those are three layers
of a three-tier application.
Oftentimes the data layer
is actually a database
and it has maybe stored procedures
that run inside the database
and that's considered its own tier,
and so the business objects tier,
the center tier is a backend process
that runs on a server
that allows your front end
to talk to a database.
It's considered bad programming practice
in modern development to have
your front end application
talking direct to the database
because that traps you into so many ways
and it also introduces some
security vulnerabilities,
especially if your front end
is running on a client's computer
or it's a website and it's
written in JavaScript or HTML.
Having a JavaScript programmed
right to our database
would be terrible.
So, oftentimes you see a
minimum of three tiers.
There is such a thing as a four tier
or five-tier application.
How does that work?
So, I've worked in companies
that split their business tier
into two separate tiers.
What you have is the business layer
and then you have a data access layer.
That's written in code.
There are things like Microsoft
does have a enterprise library
that does come with data access block
but you can write code
that simply interfaces
with the database, you can call a method,
it does one thing, returns
the results to the caller
but the business layer
contains the business logic.
So, basically an n-tier architecture
is a software program divided into tiers,
the front end, the presentation tier,
could be the web development,
could be a mobile app,
could be running on your desktop,
business tier running on a server
and the data tier oftentimes
running inside of a database.
And that's an n-tier architecture.
Thanks for watching.
If you have any questions
about architecture,
leave them in the comments
and I'll be sure to get to them.
Thanks a lot and see you next time.
Thank you so much for watching.
Click the thumbs up button
if you like this video.
There's the subscribe button down below
if you want to see more videos like this
as I create them.
On the right is another video
about software architecture
that you might enjoy.
On the left, I actually have
a course on architecture.
I want you to check it out.
Up above is my website.
If you want to go there,
read some blog articles,
things like that,
and finally, if you have any questions
about software enterprise architecture,
just leave them in the
comments on YouTube channel
and I'd be happy to talk to you there.
So, thanks again and I
hope to see you again.
