3-Tier Development

Discussion in 'ASP .Net' started by Alex Papadimoulis, Dec 12, 2003.

  1. Hi Bernardo,

    Here are my thoughts:

    > I have a class DBObjects that returns the correct ADO.NET object for the
    > database i´m using, since I want my system to be ready for any DBMS.

    Watchout for the MPTE Trap (Must Port To Everything). Is there a really a
    need to make it be ready for any DBMS? Often times, the answer is really no.
    Just because there is a remote possibility that perhaps sometime in the
    future a later user of the system may just want to make it run on the Atari
    2600 ... doesn't mean it's going to happen. And when it does, it is a lot
    more work then just switching the "DATABASE-TO-USE" paramater ...

    > Or should I have a userDB class that has all the same properties than user
    > and have the load and write methods for the DataBase and make the user

    load
    > and write methods delegate to the user ones???
    > If so I would have two classes almost identically... What should I

    Two almost identical classes is just too much code and too complex. No need
    for that. Sometimes DataObject classes are needed, sometimes they're just
    simple enough that their not needed. I'd go with just one class that does
    the CRUD operations.

    Good luck, and dont hesitate asking more ?? !
    -- Alex Papadimoulis



    "Bernardo Heynemann" <> wrote in message
    news:...
    > I´m building a web project manager in ASP.net.
    > So i´m using the 3-tier architecture...
    > I´m using an interface layer, a business layer and a database access
    > layer...
    >
    > I need an opinion from you more experienced guys.
    >
    > I then have a user class... This one is obviously a business class.
    > My doubt is:
    > Do this class make direct access to the DAL (Data Access Layer) and make

    all
    > the inserts, updates and selects?
    > Or should I have a userDB class that has all the same properties than user
    > and have the load and write methods for the DataBase and make the user

    load
    > and write methods delegate to the user ones???
    > If so I would have two classes almost identically... What should I
    > do?!?!?!??!?!?! heherheheheh kidding... but any help is most welcome!!!
    >
    > See ya,
    > Bernardo Heynemann
    >
    >
    Alex Papadimoulis, Dec 12, 2003
    #1
    1. Advertising

  2. I´m building a web project manager in ASP.net.
    So i´m using the 3-tier architecture...
    I´m using an interface layer, a business layer and a database access
    layer...

    I need an opinion from you more experienced guys.
    I have a class DBObjects that returns the correct ADO.NET object for the
    database i´m using, since I want my system to be ready for any DBMS.
    This class is obviously in the database access layer.

    I then have a user class... This one is obviously a business class.
    My doubt is:
    Do this class make direct access to the DAL (Data Access Layer) and make all
    the inserts, updates and selects?
    Or should I have a userDB class that has all the same properties than user
    and have the load and write methods for the DataBase and make the user load
    and write methods delegate to the user ones???
    If so I would have two classes almost identically... What should I
    do?!?!?!??!?!?! heherheheheh kidding... but any help is most welcome!!!

    See ya,
    Bernardo Heynemann
    Bernardo Heynemann, Dec 12, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rob

    ASP v2 & 3-tier or 2-tier

    rob, Aug 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    407
    Steve C. Orr [MVP, MCSD]
    Aug 13, 2004
  2. NOSPAM

    2 tier to 3 tier?

    NOSPAM, Oct 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    427
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 14, 2004
  3. Steve Kershaw

    Setting up a new tier in a 3-tier system?

    Steve Kershaw, Mar 28, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    445
    Steve Kershaw
    Mar 29, 2006
  4. Shantanu Bhattacharya
    Replies:
    2
    Views:
    548
    Christopher Benson-Manica
    Dec 26, 2003
  5. Shantanu Bhattacharya

    Converting a 2-tier application to 3-tier application

    Shantanu Bhattacharya, Dec 25, 2003, in forum: C Programming
    Replies:
    2
    Views:
    456
    Christopher Benson-Manica
    Dec 26, 2003
Loading...

Share This Page