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
>
>
|