Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to place the bizrules?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00612687
Message ID:
00612747
Views:
22
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
Previous
Reply
Map
View

Click here to load this message in the networking platform