Fork me on GitHub

Evaluation Engine


In many applications, the program flow depends on a lot of decisions whether some condition is met or not. This leads to if statements checking all kind of things through out the code:

The problem with such code is that it gets hard to maintain. Whenever a rule changes, you have to make sure that you change all if statements using it. Furthermore, the code checking the condition needs to know a lot about the details how the decision is made and therefore needs to know a lot of dependencies (like context, foo, bar and foobar in the above example).

The evaluation engine solves this problem by decoupling the code defining what happens under what conditions (questioner) from the code deciding which conditions hold (oracle);