Thursday, May 28, 2009

Software Engineering: Three-Tier or n-tier Architecture

Three-Tier Architecture:

In three-tier architecture (often referred to as n-tier architecture) is a client-server architecture in which the presentation and the application processing and the data management are logically separate processes.

Tier 1: the client contains the presentation logic, including simple control and user input validation. This application is also known as a thin client.


Tier 2: the middle tier is also known as the application server, which provides the business processes logic and the data access.


Tier 3: the data server provides the business data.



These are some of the advantages of a three-tier architecture:

It is easier to modify or replace any tier without affecting the other tiers.
Separating the application and database functionality means better load balancing.
Adequate security policies can be enforced within the server tiers without hindering the clients.


A three-tier architecture is a client-server architecture in which the functional process logic, data access, computer data storage and user interface are developed and maintained as independent modules on separate platforms. Three-tier architecture is a software design pattern and a well-established software architecture.
5 Benefits of a three-Tier Architecture
Here are 5 benefits of separating an application into tiers:
1.    It gives you the ability to update the technology stack of one tier, without impacting other areas of the application.
2.    It allows for different development teams to each work on their own areas of expertise. Today’s developers are more likely to have deep competency in one area, like coding the front end of an application, instead of working on the full stack.
3.    You are able to scale the application up and out. A separate back-end tier, for example, allows you to deploy to a variety of databases instead of being locked into one particular technology. It also allows you to scale up by adding multiple web servers.
4.    It adds reliability and more independence of the underlying servers or services.
5.    It provides an ease of maintenance of the code base, managing presentation code and business logic separately, so that a change to business logic, for example, does not impact the presentation layer.


Most companies understand the weaknesses of their aging legacy system but still have to deliver products and services, while they pay employees and perform other mission critical operations. In short, there is only so much to go around.
An N-Tier architecture has a presentation layer and two separate server layers - a business logic or application layer and a data layer.
The client becomes the presentation layer and handles the user interface. The application layer functions between the other two layers, sending the client's data requests to the data layer. The client is freed of application layer tasks, which eliminate the need for powerful client technology.

Why N-Tier is right for mission-critical systems.
In the N-Tier model, a departmental client could initiate some departmental business logic on the departmental application server(s) which, as part of a network transaction, could update the departmental database(s) and then initiate business logic on the enterprise application server(s).
These enterprise application server(s) could then update the enterprise database server(s). All of this takes place under the umbrella of a network transaction.
Any one of the chain of application server(s) could initiate a rollback which would be cascaded to all of the application server(s) involved. This capability allows a delegated approach to how business rules are implemented.
This business logic can access data in legacy mainframe operating systems such as CICS / VSAM, IDMS, and/or SQL compliant RDBMS servers such as Oracle, SYBASE, Interbase, DB2 etc, running on a variety of Wintel or UNIX platforms.
In addition, as the business processes are identified and appropriate business logic is implemented on the application server(s), these services could then be globally advertised.

2 comments:

Anonymous said...

nice article....thank you

Tanuja said...

Nice Article!! All the best!!
Keep Going!!