Question
Can anyone provide me with a web link that shows a correct approach of n-Layered design with example source-code in VS2005 and C#?
I am confused in one point, If I am creating layers like the following:
UI
|
Business Logic
|
Data Access
then how can I achieve true OOP?
Coz In OOP all activities should be encapsulated within an Object.
According to my thought, this should be layered like this:
UI
|
Business Objects
|
Business Logics
|
Data Access
But when trying to design layers like this I experienced Circular Reference Problem.
One of my buddy told me that, he solved this problem with Reflection.
So what is the industry-standard approach in separating a c# application into layers?
And a burning question is, which layer hosts the OR-Mapping?
Solution
alt text http://amrelgarhy.com/files/uploads/9-1-2009%208-58-14%20PM.png
And Some times goes like this:
alt text http://amrelgarhy.com/files/uploads/9-1-2009%208-59-14%20PM.png
So as you see in the 2 previous diagrams, the ORM located in the data access layer