Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Biz Rules question
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00790170
Message ID:
00790254
Vues:
17
Bob,

>Why does a business object only support a single rule class rather than a collection of bizrules? I would like to create a bizrule class for each rule and be able to reuse these rules on any bizobj where it applies?

I made a conscious design decision to architect it this way. While your application might warrant reusable rules that apply to multiple business objects, I haven't seen this in any of the business applications I've modeled. Sometimes there are common checks that need to be performed (such as address, e-mail, Mod10, and so on), but I typically put these sort of checks in static methods of utility classes which can be called from multiple business rule classes. Based on these typical needs, I think it would be cumbersome to create a different class for each rule.

>Also, I am wondering why you didn't have a 'Fire Biz Rules' event with a delagate, then I could add my bizrules objects to the event and get a bit looser coupling including the ability to define the rules on the fly based on 'something'.

Given your needs this might make sense. You could actually subclass either the MM .NET business object or business rule class, add this event and call it from one of the hooks we've provided.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform