Tuesday, October 1, 2013

What is Data Logic Layer (DLL), Business Logic Layer (BLL) And User Interface (UI) ?



It is part of 3-tier or can be used in N-layer architecture. We will start architecture where it is used. Each name itself explain little bit what they exactly mean.
Basically 3-tier included all this, in Tier application we are dividing application into different modules (Layers) to reduce the complexity and more efficient code & easy to manage.


DLL (Database Logic Layer/
Data Access Layer): As name states, all the concept regarding the Database will go here. Your connectivity, Query, Manipulation, Execution of SQL Query and so on. Will take the same example where you are doing calculation and want to store the values or history in some database table. All the logic will go here. 
 
BLL (Business Logic Layer): As name states, all the concept what you do with Business will go here. Basically you can say if i am building Calculation application now all the Calculation logic can reside in this layer. You can have interface here and there implementation in this layer for simplicity.

UI (User Interface): User Interface is what user see, it will contain all the controls, Java Script which is user facing. You should not write any logic in User Interface area just your UI controls and so forth.

Are the 3 main layers to develop 3 tier architecture.

The UI
(User Interface) layer is the one which is our .aspx with code behind file. So what ever we create the .aspx pages, those comes under the UI (User Interface) layer of the architecture.

BLL
(Business Logic Layer)  or the Business Logic Layer is the one, where we can define the business logic, business object or lets say the properties and method which will interact to other layers through out the application.
So in BLL, we can define the public properties as well as the constraints or rules so that before sending the data to the database, we can check it and if it violates the rules, then get the error back to UI
(User Interface) layer. 

Hence no need to propagate the data to the DAL.
DAL is one the important layer where we define all the methods related to database transactions- Insert, update, Delete, select etc.
So all the stuff which we do at our code behind related to database, is the part of Data-acess layer.

No comments:

Post a Comment