Greetings!
Working on a web based project were business rules and logic need to be customized by client. I want to do this without having to recompile the application every time we sign up a new client on the system. The architectures I have outlined so far are:
Have you ever implemented anything similar to this? If so, what is your experience? And finally is there another solution that I should be exploring?
Thanks for your help!!
I have implemented most of the approaches you mention. The answer may depend on a variety of factors.
What client role(s) will be making the changes to the business rules (e.g. business analyst, developer, power user, etc.)? Meaningful support for business analysts may require a rules engine with externalized rules in a db and a useable UI. Meaningful support for developers might be as simple as leveraging something like MEF (http://www.codeplex.com/MEF).
You might also factor in how often will the business rules need to be changed and what sorts of associated operational requirements may apply (e.g. host process must remain running, app domain unloading ok, etc.). A good selection may require some careful thought about likely vs. unlikely future needs.
You can do data driven business rules, like this. Decision trees can be a good way to go as well.
You might also think about aspect-oriented programming as a way to implement business rules.
My only caution with a Rete induction rules engine is that the rule sets should be kept small and close to the objects that use them. If you can encapsulate the behavior of an object in a rules engine that's part of its state, all the better. I don't care for the "enterprise" solution that dumps thousands of rules into a singleton rules engine that becomes a dependency for every part of the enterprise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With