For simple validation rules the main benefit of using drools is the decoupling of your business logic from your application. Another benefit is the power of DRL language. For example, implementing the 'exists', 'collect', 'accumulate', 'from' etc. behavior in plain java is not a trivial task. In Drools you already have all that power and you can create really complex rules with just a few lines of DRL.
This is what i think (has to be confirmed from specialist)
Every thing you do in Drools you can do it as well in Java. But if you
have a modification on your java code, you have to modify, then compile
and deploy. contrary to the Drl rules which are interpreted, so after
modification you don't need to do any thing just save your modification.
So in the case of drools you have some flexibility which means that the
rules can be managed directly by the decider and not the developer.
Le 29/10/2012 23:57, kina06 a écrit :
> Please don't ignore this question as routine, did google and read posting,
> didn't get satisfying answer, hope you guys can help.
> I have seen some drool rules in our company, I know drools provide
> declarative rules, easy to modify etc etc, but I see it does need some
> programming knowledge, so why not put all your rule logic into Java code,
> what is drools doing different can't be implemented in Java a separate
> package (like your logic package). Except losing flexibility of modify
> code/logic in text file I don't see much benefit.
> Please help me understand, whats the major benefit of drools rules that
> can't be done in Java with same set of concise code.
> View this message in context: http://drools.46999.n3.nabble.com/Drool-rules-vs-java-code-effiency-tp4020549.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> rules-users mailing list
rules-users mailing list