Two-Tier and Three-Tier Architecture with example
In this article I will show a simple example to demonstrate about the two types of architecture.
In this article we are going to discuss about the two-tier and three-tier architecture.
The two-tier architecture is like client server application. The direct communication takes place between client and server. There is no intermediate between client and server.
The above figure shows the architecture of two-tier. Here the communication is one to one. Let us see the concept of two tier with real time application. For example now we have a need to save the employee details in database. The two tiers of two-tier architecture is
- Database (Data tier)
- Client Application (Client tier)
So, in client application the client writes the program for saving the record in SQL Server and thereby saving the data in the database.
- Understanding and maintenances is easier.
- Performance will be reduced when there are more users.
Three tier architecture having three layers. They are
- Client layer
- Business layer
- Data layer
Client layer: Here we design the form using textbox, label etc.
Business layer: It is the intermediate layer which has the functions for client layer and it is used to make communication faster between client and data layer. It provides the business processes logic and the data access.
Data layer: it has the database.
- Easy to modify with out affecting other modules
- Fast communication
- Performance will be good in three tier architecture.