Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to place the bizrules?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00612687
Message ID:
00612747
Vues:
23
John,

You have to ask yourself certain questions. For instance, would business rules for entity be re-used by another? In that case, you might consider creating a collection of separate business rules objects to handle your business rules. Of course, you'd have to split them to the smallest common denominator, but that shpouldn't be too difficult. And, if they all support the same interface, meaning they all have a method named ProcessRules() that would be called by your business objects. That way, you could have more than one business rules object per business object.

If however, the likelyhood of needing to re-use the same rules over multiple business objects is minimal, then you can reduce the complexity of your design and speed up execution by placing your code directly into the Validate() method you mentioned.

HTH,

Travis

>hi,
>Where should I place my bizrules, in a class called bizrules or my common business class such as customer.validate()?
>
>Thank you
Travis Vandersypen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform