Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Separate BO and DAL or not?
Message
 
 
À
25/08/2009 14:11:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01420522
Message ID:
01420524
Vues:
57
>>Hi,
>>
>>What is the benefit of separating BO and DAL objects vs having one (as referred by West Wind Client Tools) single line business object? Before looking at the WW Client Tools BO I thought it was a must to have BO and DA separated. So now I am wondering, if one object that has the functionality of BO and DAL together is ok?
>>
>>Thank you in advance for sharing your thoughts.
>
>
>We currently support two different backends. SQL and VFP because of this we have the DAL and BO separated out and only need to one BO with two different DAL. If we want to add a 3rd DAL all we need to do is code another object and make sure it returns the same type of data to the BO.

Good point. What I was doing is whenever data access was needed I would have a code in 2 conditions, one for SQL Server and one for VFP data. For example,
if plSqlServer    && public variable
   *-- code to access SQL Server
else
   *-- code to access VFP
endif 
The convenience of my approach (which I am sure has drawbacks) is that I see the code for both (or maybe 3rd choice) of database in one place and compare things.

Thank you very much for your input.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform