tags:

views:

42

answers:

1

I need suggestion for three layered architecture I am planning to implement.

Scenario

Am Working in ASP.NET c# 3.5 Environment.

DLHelper: Methods to get data from database.

DAL : Contains Methods which collects data from database with help of DLHelper classes. Most of the methods in this layer are not referencing any page level object, hence can be declared static.

BL : Same as DAL Layer, most of the methods are not referencing any page other page level object, hence can be declared static.

UI Layer: As per above scenario UI Layer call to BL Layer is like

BLClass.Method -> DALClass.Method

Question I would like to know is this standardise way to do it. As per discussion with my co-worker, we should have corresponding object of BL/DAL layer. But am still looking for more convencing answer.

A: 

I was looking for the same answer. That is 'if there is a standard way/best practice' for an application design. My question had to do with static methods on the BL.I don't think I can give you a straight answer though.

I can tell you that in my case, I moved on and made the methods in some Classes static. I did that since there was no need for Instances (as they are strictly defined in OOP literature). That is, there was no need to create objects that would have their own state.

"As per discussion with my co-worker, we should have object of every layer". If you mean that there is going to be ONE object then i urge you to reconsider. In most cases there are more than one 'collaborating' to deliver a result (with exceptions of course).

The 'responsibility driven design' was and is really helpful for me in many cases.

andreas
Not entire layer as an object, but corresponding layer object of entity.
BigBoss