3 ms·
Business rules systems and logic programming are definitely similar. Most business rules are based on "Forward Chaining" (https://en.wikipedia.org/wiki/Forward_
by cpitman 10y ago
Business rules systems and logic programming are definitely similar. Most business rules are based on "Forward Chaining" (https://en.wikipedia.org/wiki/Forward_chaining https://en.wikipedia.org/wiki/Forward_chaining), basically using what we know to satisfy the left hand side condition and then using the right hand side to assert new facts. Logic programming is usually based on "Backward Chaining" (https://en.wikipedia.org/wiki/Backward_chaining https://en.wikipedia.org/wiki/Backward_chaining), where the system attempts to work backwards from a goal to what facts are needed to satisfy the goal.
- theknarf 10y agoWhat would be the use case for using something like nools? Compared to just writing it in JS or Java or whatever the rest of your business logic is written in.
- dsego 10y agoAny business rules that need to be changed easily later, that is almost anything and everything. Examples include discount rates, loyalty points, insurance premiums and so on. Especially when you have domain experts creating and updating the rules. Take a look here at the drools (the java equivalent to nools) documentation: https://docs.jboss.org/drools/release/5.4.0.CR1/drools-expert-docs/html/ch01.html https://docs.jboss.org/drools/release/5.4.0.CR1/drools-exper...
- cpitman 10y agoThe usual idea is (1) to encourage stronger separation between the actual business logic and any boilerplate that surrounds it and (2) to write business logic in a way more accessible to non-developers. A rete-based rules engine is more than just a sequence of if-then statements, they allow for any rule to assert new facts that then cause other rules to trigger/retrigger. This also lets you gradually introduce new facts and have the results updated.