Zaffiro Zaffiro - 12 days ago 4
ASP.NET (C#) Question

Dynamic Business Rules in a web application

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:


  1. Windows Workflow: Creating dynamic workflows and saving them to the database.

  2. Reflection: Creating a business rules interface and use reflection to load the custom client assembly.

  3. A true business rules engine

  4. Implementing an IOC Container like structure map. [zaff: added 6/4]



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!!

Answer

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.

Comments