4 ms·
It buys you a higher level of abstraction. Now, abstractions have costs and benefits, so it's up to you whether it makes sense in any particular case. But that'
by a-priori 12y ago
It buys you a higher level of abstraction. Now, abstractions have costs and benefits, so it's up to you whether it makes sense in any particular case. But that's what this tool buys you.
In this case, its benefits are that the logic is stated in natural language, in domain terms, so it could be written and/or reviewed by domain experts or business analysts. It's basically a very simple business rule engine. It's similar in this way to Cucumber, except that this is specifying production logic instead of test cases.
It's also just text so the logic could also be updated by users at run-time, making the system scriptable, if you need that kind of reconfigurability.
- kyllo 12y agoI can see the potential benefit in that, if there are specific types of business rules that really need to be configurable by the users. However I think that if overused, this not only makes your system slow due to excessive string-comparing, it also leads to a potentially awful antipattern that I'm all too familiar with from my own experiences in enterprise software dev. Add a few more features to this Aristotle language, and pretty soon you may have just invented yourself an ad-hoc, informally-specified, bug-ridden, slow implementation of a new programming language. http://thedailywtf.com/articles/The_Enterprise_Rules_Engine http://thedailywtf.com/articles/The_Enterprise_Rules_Engine http://en.wikipedia.org/wiki/Inner-platform_effect http://en.wikipedia.org/wiki/Inner-platform_effect http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule If you really need configurable rules in a rails app though, I'd think it would be faster and more maintainable to just create a DSL within Ruby code rather than parsing a text file. Then you could use the if-this-then-that type business logic syntax but still have it be legal Ruby code and get all the tooling support that comes with it.