ARTICLE

3 Tier Architecture

Posted by Harshit Vyas Articles | Networking November 02, 2010
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.
Reader Level:
Download Files:
 

Introduction:

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.

3-Tier architecture generally contains UI or Presentation Layer, Business Access Layer (BAL) or Business Logic Layer and Data Access Layer (DAL) and sometimes property layer.

Presentation Layer (UI)

Presentation layer contains 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 (First Name, Last Name, and Age) and I will refer only these data throughout this article.

Property layer.

Generally it contains the entire variable those need to pass from presentation to bal, bal to dal and vice versa so instead of writing those each and every time we can create property layer.

Typical structure will look like this.

It contains one solution with three class library and one website.

layer.gif

Now to create above structure first create new project and add one visual studio blank solution.

Now add 3 class libraries and one website in it give the relative name to them.

For the code purpose or what to write in which layer please download the source code.
 

Login to add your contents and source code to this article
post comment
     

hey have you done something or some special code for sql server 2005 ? because it does not demands for sql server version on my system stills it runs o my pc

Posted by Anurag Sarkar Dec 16, 2012

It will help me a lot. Thanks

Posted by Nirav Vaghela Jul 05, 2012

Hi.. My project has same structure as you have shown here.. i want to add the Businesslayer reference to the website.. I have added the reference by right clicking the website and using add reference.. Also in the web page where i want to use the objects of the business layer i have added the refernce like this Using BusinessLayer; but still i get the error that namespace could not be found. What could be the error? can you please help me?

Posted by B M Suchitra Nov 16, 2011

Harshit this is the most easiest method which you have specified for 3 tier architecture its the best

Posted by kashif shaikh Jun 16, 2011

its clear my confusion about implementation of 3-Tier Arch... good work....!

Posted by Yogendra Kumar Mar 25, 2011
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
Join a Chapter
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Join a Chapter