ASP.net application architecture and design questions

Tech-Archive recommends: Fix windows errors by optimizing your registry



I often read about a 3-tier architecture consisting of a presentation layer, business logic layer and a data access layer. I'm somewhat confused by the BLL. Should the BLL be separate from the web application? (for example, should I be able to take the BLL and DAL out of the ASP.net project and put it into a WinForms project without any changes?)

For example, if I had a simple project where I had a class User (in the BLL), as I understand it, I'd probably also have a class UserAdapter (in the DAL). I assume the User class shouldn't reference any ASP.net objects? I'd use the UserAdapter to load data from the database into a User object. ..aspx.cs files would contain the code for the presentation layer that would utilize the User class.

In the above situation, my problem is, where do I put classes that reference ASP.net objects? For example, what if I wanted to create a method getUser() that checks the session to see if an existing User object exists for the session, if not, it creates a new one. Where would this method go? To me it seems like more a 4-tier architecture:

1. Data Access Layer
2. Business Logic Layer (contains no ASP.net specific code)
3. Classes & methods that contain ASP.net specific code??? (is this considered part of the presentation layer?)
4. Presentation Layer

Also, what is the standard folder layout in the project for this type of architecture? What folders would I put the code for each of the layers in? How do I separate layers #2 and #3 from each other?

I've read many articles on this, but I'm still having problems understanding where #3 (as stated above) should go. I've tried looking for sample projects that implement this n-tier architecture, but all the ones I find are either too basic (for simplicity reasons, they don't separate stuff enough) or they're too complex (difficult to look through to understand the entire application architecture). Much thanks to anyone who could help explain this to me and also if you know of a good sample project that might illustrate something like this. Thanks!

.



Relevant Pages

  • Re: OBJECT-ORIENTED LAYERED ARCHITECTURE AND SUBSYSTEMS
    ... > OBJECT-ORIENTED LAYERED ARCHITECTURE AND SUBSYSTEMS ... > requirements of system owners, users, and clients. ... > code modules which all carry out the same necessary tasks for a layer. ... > each of those areas, or domains, constitutes a subsystem. ...
    (comp.object)
  • OBJECT-ORIENTED LAYERED ARCHITECTURE AND SUBSYSTEMS
    ... OBJECT-ORIENTED LAYERED ARCHITECTURE AND SUBSYSTEMS ... project's physical design, and implementation. ... code modules which all carry out the same necessary tasks for a layer. ... each of those areas, or domains, constitutes a subsystem. ...
    (comp.object)
  • Re: Some architecture advice
    ... > I've used business objects for a while, ... > make apps that are more maintainable. ... each layer is independent of one another and each ... > Being relatively inexperienced with architecture I'm sure ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [OT] Is OO incompatible with the three tier architecture
    ... >> an architecture that could not be expanded. ... It is passed straight through the business layer to the data layer. ... layer to the presentation layer where it is formatted for output. ... In my long experience the choice of language comes ...
    (comp.lang.php)
  • Layered OO System Architecture & Why Dip Is Errant
    ... Extended Discussion On Layered OO System Architecture ... A system layer is able to compile, ... Having each layer use abstract interfaces, ... policy" and that classes which implement abstract interfaces are "low ...
    (comp.object)