Saturday, 30 August 2014

3 Tire Architecture.

3-Tier architecture is a very well know buzz word in the world of software development whether it web based or desktop based. In this article I am going to show how to design a web application based on 3-tier architecture.
Introduction 
3-Tier architecture generally contains UI or Presentation Layer, Business Access Layer (BAL) or Business Logic Layer and Data Access Layer (DAL). 

Presentation Layer (UI) 
Presentation layer cotains pages like .aspx or windows form where data is presented to the user or input is taken from the user. 

Business Access Layer (BAL) or Business Logic Layer 
BAL contains business logic, validations or calculations related with the data, if needed. I will call it Business Access Layer in my demo. 

Data Access Layer (DAL) 
DAL contains methods that helps business layer to connect the data and perform required action, might be returning data or manipulating data (insert, update, delete etc). For this demo application, I have taken a very simple example. I am assuming that I have to play with record of persons (FirstName, LastName, Age) and I will refer only these data through out this article.
 
What is Tier and Layer ?
Here I Will explain what is Tire  and Layer we need to clarify the difference between two terms in N-Tier architecture  Tier and Layer. Tier usually means the physical deployment computer. Usually an individual running server is one tier. Several servers may also be counted as one tier, such as server fail-over clustering. By contrast, layer usually means logic software component group mainly by functionality  layer is used for software development purpose. Layer software implementation has many advantages and is a good way to achieve N-Tier architecture. Layer and tier may or may not exactly match each other. Each layer may run in an individual tier. However, multiple layers may also be able to run in one tier. 

Tire:
It indicates a physical separation of components, which may mean different assemblies such as DLL, EXE, etc. 
Layer:
It indicates a physical separation of components, which may mean different assemblies such as DLL, EXE, etc. on the same server or multiple servers.

By using 3-Tier architecture in your project you can achive 

1. Seperation - the functionality is seperated from the data access and presentation so that it is more maintainable 
2. Independence - layers are established so that if one is modified (to some extent) it will not affect other layers. 
3. Reusability - As the layers are seperated, it can exist as a module that can be reused by other application by referencing it. 

Hope this article helped you understanding 3-Tier architecture and desiging it.

Related Posts:

  • How To Use Grid View Page Index Changing In Asp.Net Here I Will Explain How to use Page Index/Pagination In Grid View.With various types of paging in ASP.NET. We use C# code to bind the SQL data with a Grid View control and use the following simple steps to mak… Read More
  • Auto Generate Row Number in GridView The GridView control is the successor to the DataGrid and extends it in a number of ways. While developing GridView control in ASP.NET, programmers often requires to display row number in GridView controls. Auto Generate… Read More
  • How To Use Cookies ASP.NET. Cookies provide the ability to store small amounts of data on a clients machine. It is often used to store user preferences, session variables, or identity. When the user visits your Web site another time, the application c… Read More
  • What is Session State In Asp.Net ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP req… Read More
  • Caching In Asp.Net Caching is the ability to store page output and data in memory for the first time it is requested and later we can quickly retrieve them for multiple, repetitious client requests. It is like keeping a copy of something for l… Read More

0 comments::

Post a Comment

Copyright © 2025 DotNet-Ashok