Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should Business layer of the application be able to access Session object?

Say you have 3 layers: UI, Business, Data.

Is that a sign of poor design if Business layer needs to access Sessions? Something about it doesn't feel right. Are there any guidelines to follow specifically tailored to web app?

I use c# 2.0 .net

like image 992
sarsnake Avatar asked May 29 '09 18:05

sarsnake


People also ask

What is the purpose of business layer?

Business Layer elements are used to model the operational organization of an enterprise in a technology-independent manner, whereas strategy elements (Chapter 7) are used to model the strategic direction and choices of the enterprise.

What is business data access layer?

The data layer manages the physical storage and retrieval of data. The business layer maintains business rules and logic. The presentation layer houses the user interface and related presentation code.

What is the difference between Service Layer and business layer?

The basic difference is: 1. Business Layer is to define business logic ( data transformation ) and Service Layer is to access data from different client's.

What is business access layer in C#?

The Business Logic layer handles all of the business rules, calculations and actual logic within your application that makes it actually "do" things and it may often use some of the objects retrieved from your data-access layer.


1 Answers

No. If you had a "Controller" layer, you should access it there. Get what you need from the Session and hand it off to your business layer.

like image 183
GreenieMeanie Avatar answered Oct 20 '22 00:10

GreenieMeanie