Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3-tier question
Message
De
19/02/2003 04:54:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
3-tier question
Divers
Thread ID:
00754835
Message ID:
00754835
Vues:
48
Hi

I was wondering how to setup business rules in the middle-tier of an application.

Application is VFP front, VFP middle and SQL-Server back-end
BO=Business Object BR=Business Rule

In the situation I'm looking at, I have a BO that, when requested to insert a new record, has to check what type of record to create, the type of record to be created will be checked by a business-rule and will return the required type of record to create, in this case R type or S type.

What I'm struggling with, is how to code this, my BO is based on the BO Class, in what form should the rule be created? Particularly considering that the rule I want to create has to query some data on the DB.

The BR has to check how many records the client has in one table, and how many records the client has in another table, what's getting me is that this BR is a required validation by the BO, but the checks it carrys out, will probably be best done from SPROC's in the DB, so should the BR call SPROC's in the DB? If so, should a BR have a connection to the DB at all?

I know alot of people place the rules directly into the BO's, but considering the amount of places certain rules may be called from, I want to make it as flexible as possible, so ideally I want the rules to be self-contained and accessible from any other BO.

Does any of this make sense?

Thanks
Kev
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform