Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to build a website in the model of 3 tier architecture in ASP.net?

user-image
Question added by Divya Vasudevan
Date Posted: 2015/11/01
Ahmed Elagamy
by Ahmed Elagamy , Sharepoint Technical Consultant , Petrochemical Industries Company

Data LayerA DAL contains methods that helps the Business Layer to connect the data and perform required actions, whether to return data or to manipulate data (insert, update, delete and so on). Business LayerA BAL contains business logic, validations or calculations related to the data.Though a web site could talk to the data access layer directly, it usually goes through another layer called the Business Layer. The Business Layer is vital in that it validates the input conditions before calling a method from the data layer. This ensures the data input is correct before proceeding, and can often ensure that the outputs are correct as well. This validation of input is called business rules, meaning the rules that the Business Layer uses to make “judgments” about the data. Presentation LayerThe Presentation Layer contains pages like .aspx or Windows Forms forms where data is presented to the user or input is taken from the user. The ASP.NET web site or Windows Forms application (the UI for the project) is called the Presentation Layer. The Presentation Layer is the most important layer simply because it’s the one that everyone sees and uses. Even with a well structured business and data layer, if the Presentation Layer is designed poorly, this gives the users a poor view of the system.more details of what you want : Here

Nader Laroussi
by Nader Laroussi , .Net Software Developer , Vaganet

1- Data Access Layer (DAL): a class library contains the models (entities), the entities's mappings and the Database Context (Entity Framework) which communicate with the Database

2- Business Logic Layer (BLL): intermediate layer between Presentation (Client) and Data Access Layer in which we can treat the requests and the responses.

3- Presentation Layer: generally with Aspx for web forms, and Razor or HTML for MVC (User interface) with a code behind (C# or VB.NET) 

PS: DAL must be referenced in BLL and Presentation, and BLL must be referenced in Presentation

 step1: Presentation --- request ---> BLL --- request ---> DAL

 step2: DAL --- communicate ---> Database

 step3: Database --- result ---> DAL

 step4: DAL -- response --> BLL -- Response --> Presentation

ዓምደ መኑ ከማከ አንተ
by ዓምደ መኑ ከማከ አንተ , Senior Database Administrator , Governmental Agency

Step 1:

 Create an Asp.net website application project. This application contains the user interface controls and logics. This layer is called presentation layer.

Step 2:

 Create a project using Class Library template. This project will contain classes for enforcing bussiness rule and also used as a bridge between Presentation layer and Data Access Layer. This layer is called Bussiness logic Layer 

Step 3:

 create a project using class library template. This project can contain object relational model (ORM) or pure classes. The purpose of classes in this project is for two way communication with data store (database). This layer is Called Data Access Layer.

After we create these projects :

 1. Data access project is referenced in Bussiness logic project.

 2. Bussiness logic project is referenced in Presentation Layer Project. 

 

Munazza Tabassum
by Munazza Tabassum , Assisstant Software engineer , Cloud7

By using Data access layer,Buisness layer, and Presentation layer

alaa hassan
by alaa hassan

Use MVC

 (Model View Controller )  

Babar Waseem
by Babar Waseem , Senior Backend Developer , Saudi Credit Bureau (SIMAH)

It's very easy. You need to have three layers as mentioned3 Tier.

1). First layer is the presentation for which you can use ASP Webforms or ASP MVC(Model View Controller).

2). From first(presentation) layer your request goes to second layer which is Business Logic Layer hence BLL. BLL is the layer where you can create you code logic on how to deal with the incoming call from presentation layer.

3). Once you deal with the incoming call in BLL then if required the data needs to be saved in the database, Which is your third layer hence Data Access Layer or DAL. DAL is only used to save or retrieve your data from data source generally a database MSSQL etc.

4). Now you need to return your request if need be with a status message or data depends of your incoming request. If it's a data save request then true or false, or anything your want it to be based on your request.

I hope this clears some confusion for your question. Meanwhile you can check these links and download the project and have a play with it. Happy Coding!

http://www.c-sharpcorner.com/UploadFile/4d/create-and-implement-3-tier-architecture-in-Asp-Net/

http://www.onlinebuff.com/article_step-by-step-3-tier-architecture-in-aspnet-using-c-example_.html

http://www.dotnetfunda.com/articles/show//3-tier-architecture-in-aspnet-with-csharp

http://www.codeproject.com/Tips//Understand-Tier-Architecture-in-Csharp

https://sites.google.com/site/sattarabdusblog/studyresources/articles/3-tier-architecture-in-asp-net-c

in asp.net first we use3 tier arcitecture make  a three class DAL ,BOL and and presentation layer

and other way use ASP.NET  frame work MVC

 

Model View Controller.There are three layers in 3 Tier Architecture as given below:-

 

Presentation Layer (UI Layer)

Business Access Layer (BAL)

Data Access Layer (DA

Deleted user
by Deleted user

1.Model is for Data structure and comm with database

2.Controller is for processing

3.View is for UI

Khaireddine MANSOURI
by Khaireddine MANSOURI , Offshore xamarin/asp.net developer , Sirius Net

Data LayerA DAL contains methods that helps the Business Layer to connect the data and perform required actions, whether to return data or to manipulate data (insert, update, delete and so on). Business LayerA BAL contains business logic, validations or calculations related to the data.Though a web site could talk to the data access layer directly, it usually goes through another layer called the Business Layer. The Business Layer is vital in that it validates the input conditions before calling a method from the data layer. This ensures the data input is correct before proceeding, and can often ensure that the outputs are correct as well. This validation of input is called business rules, meaning the rules that the Business Layer uses to make “judgments” about the data. Presentation LayerThe Presentation Layer contains pages like .aspx or Windows Forms forms where data is presented to the user or input is taken from the user. The ASP.NET web site or Windows Forms application (the UI for the project) is called the Presentation Layer. The Presentation Layer is the most important layer simply because it’s the one that everyone sees and uses. Even with a well structured business and data layer, if the Presentation Layer is designed poorly, this gives the users a poor view of the system.

Better to used MVC pattern

Model-View-Controller

 

There are three layers in 3 Tier Architecture as given below:-

Presentation Layer (UI Layer)

Business Access Layer (BAL)

Data Access Layer (DAL)

More Questions Like This