You must Sign In to post a response.
  • Category: ASP.NET

    How to link presentation layer bal and dal?


    I design presentation layer i didn't know how to link with bal and dal in 3 tier plz give the idea if any sample project plz send it for me.

  • #766059
    Three tier architecture is nothing, its separating the UI, business logic and DB logic.
    UI-> BL->DL
    UI-> You can handle all the design in your aspx page. Do not handle any business logic in the page. Just assign the data into the UI.
    BL-> Create separate DLL and write all the business logic methods. In this business logic do not write any in build SQL query in this. Just call Stored procedures from the BL. And also do not write any code UI related codes/scripts
    DL-> Write Store procedures that will do all the CRUD functionalities.

    The main purpose is, you can change any of the layer at any time based one your requirement with minimum code change.

    By Nathan
    Direction is important than speed

  • #766063

    Before going to design 3-tier application, I suggest you to go through few articles related to 3-Tier Application and try to design few samples using that then start to implement in your project, coming to your query, if you want to call BAL, DAL from your UI then you need to know what is DAL and BAL,

    DAL: In this layer we should be perform DataSource related operations. For communicate to DataBase in our application we use this layer here we perform all operations like insertion,deletion,updation and selection.

    BAL: Most of the logics are return in this layer application all other layers use this layer for providing inputs to it and also to get the outputs from it.

    UI: In this layer we perform all presentation related information or Graphical User Interface (GUI). The logic or calculations and other code should be return in this layer.

    If you want to call BAL in your UI then add the assembly reference and based on class object you can able to call the BAL methods, in the same manner add DAL assembly reference and based on class object you can able to call the DAL methods in BAL class.

    Refer below sample link for your reference, here I explain the same with examples;

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #766067
    Data Layer
    DAL is connected to Business layer and used to carry out database related operations (insert, update, delete and so on).

    Business Layer
    A BAL contains business logic, validations or calculations related to the data.

    Presentation Layer
    The Presentation Layer contains pages like .aspx or Windows Forms forms where data is presented to the user or input is taken from the user

    Now to connect UI with BAL we need to create its DLL and access it using reference in BAL. and business logic layer will contains the reference of DAL

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #766076
    Please find some of the demo projects on 3 tier architecture by our DNS team mates:

  • #766090

    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.

    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).

    So Add the dll of DAL in BL layer.
    Add the dll of BL into UI layer.

    Now you will be able to call methods of BAL in UI layer.
    And in BAL layer you will be able to call the DAL methods

  • #766093
    3 tier means

    PL - > Presentation layout.

    We can design our Html Pages.

    BL-> Business Logic Layer

    we can implemented Business Logics

    DAL -> Data Access Layer

    we can Implemented Data access Purpose.

    Presentation layers design aspx page in Client Side.

    Server Side -> Call method from (BAL) and take Instance .

    BAL Call Methods create new instance -> DAL Methods

    Name : Dotnet Developer-2015
    Email Id :

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • Sign In to post your comments