3-tier-architecture
3-tier-architecture
Hello Guys,
Hello Guys,
Here I am
giving you a brief intro about 3-tier architecture.
3-tier-architecture
is the most important part of building any application, the way you build your
application decide the flexibility and reliability of it. The powerful
structure of the application helps users as well as developers in an efficient
way.
Let’s have a
look first what a 3-tier architecture is and how it works :
There are
three main layers in this architecture.
(1) Presentation Layer
Presentation
layer contains UI part of our application i.e., our aspx pages or input
is taken from the user. This layer mainly used for design purpose and get or
set the data back and forth. Here I have designed my registration aspx page
like this
(2) Business Layer
This layer
contains the main logic of your application. Like contains our
business logic, calculations related with the data like insert data, retrieve
data and validating the data.
This acts as an interface between presentation layer and Data Access Layer
Here all the classes, properties, constructors and methods are implemented. This layer gets the data from presentation layer and pass it to the data access layer to perform actions on database. Data Access layer hence, returns the value to the business layer and it again pass this value to the presentation layer. So business layer is the bridge between presentation and data access layers.
This acts as an interface between presentation layer and Data Access Layer
Here all the classes, properties, constructors and methods are implemented. This layer gets the data from presentation layer and pass it to the data access layer to perform actions on database. Data Access layer hence, returns the value to the business layer and it again pass this value to the presentation layer. So business layer is the bridge between presentation and data access layers.
(3) Data Access Layer
This layer
is only authorized(desirably) to make operations on database and perform CRUD
(Create,Read,Update and Delete) queries on the database. It will run stored
procedures and return data processed by them and pass it back to the business
layer.
IT MEANS:-
3-tier application architecture provides a model for developers to create a flexible and reusable application. By Breaking up an application into different Modules/Tier, developers only have to modify or add a specific layer, rather than have to rewrite the entire application over. For example, if you want to add a new field “mobile” to the user table in database, you will have to change the code each and every place where you required to get this field, update this field or insert value into this field. But if you have implemented a 3-tier architecture, you can just add a new property to the user class and that’s it!!
3-tier application architecture provides a model for developers to create a flexible and reusable application. By Breaking up an application into different Modules/Tier, developers only have to modify or add a specific layer, rather than have to rewrite the entire application over. For example, if you want to add a new field “mobile” to the user table in database, you will have to change the code each and every place where you required to get this field, update this field or insert value into this field. But if you have implemented a 3-tier architecture, you can just add a new property to the user class and that’s it!!
Since the
business logic is separated from the data access layer, changing the data
access layer won’t affect the business logic much. Let’s say if we are moving
from SQL Server data storage to Oracle there shouldn’t be any changes required
in the business layer component and in the presentation layer. We would only
make the changes to data access layer and that’s it, again!!
So, from the
developer’s view, the application built using tired architecture is efficient
and well manageable.
..........................
0 comments