Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
YAQ on BIZ and DA tiers
Message
De
20/08/2009 18:10:54
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01419401
Message ID:
01419411
Vues:
53
>Hi,
>
>I am trying to better understand the basics of 3-tier design. I am actually refactoring my VFP application to be a 3-tier design but prefer to ask general question(s) on .NET forum.
>
>In the 3-tier application you have a bunch of BIZ objects, for different entities. That is clear. Is it correct to assume that there should be only one DA object that all BIZ objects use to update the database?
>
>(Side note. In my VFP application no matter how I try I can't seem to design it this way. So, so far, I end up having a separate DA object for each BIZ object. This is probably wrong but I want to be sure).


It isn't wrong to have a DataAccess Object for each Business object if needed. In that case I would create a DataAccess Base class with the bulk of the retrieval code in it and then each DA can inherit from that with just the differences you need for that specific implementation. The crux of nTier is the use of MessagePassing between the layers. The UI does not do any data stuff it would ask your business object to do that. Your business object would then ask your DA to do the actual retrieval. The DA then after getting the data passes it back to the Biz Obj and the bizObj passes it back to the UI. With the DataAccess tier and a base class you keep your retrieval code clean and single minded. With your business objects in between the UI and DA they can do the enforcement of any rules as the requests go through them.
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform