Before you try to tackle a rules engine, you should definitely have a good understanding of declarative programming languages. Declarative programming is very different from functional programming a la Java, C++, C#, Visual Basic, Fortran, Cobol, etc. To build your fundamentals in declarative programming, you should attempt to master a language like Prolog or Lisp. These languages were the inspiration for many of the rules engines that we have today. These were the tools that Charles Forgy and others experimented with before they developed the technologies that we leverage today in the rules community. I would be hesitant to put a warning label on a Rules Engine as we would on cigarettes. However, let me say this: "WARNING: The surgeon general cautions users of rules engines that dabbling with rules engines without a core understanding of declarative programming may be hazardous to your sanity."
Best Regards, Dave -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Russ Egan Sent: Tuesday, April 11, 2006 8:25 AM To: [email protected] Subject: Re: [drools-user] How to express conditional logic via DRL - ? Speaking of which, I've tried to find good, in-depth guides for rules engine usage. Best practices, rules writing guidelines, cookbooks, advanced use cases, patterns, etc... All I've found are very shallow "introductions" to rules engines. Does anyone know of good, educational materials of this nature on the web? Or good books? It's tough to avoid using rules engines "the wrong way" when this is little guidance for using them "right way", and when rules engines are so conceptually different from procedural programming. Hello Mark, > Unfortunately I'm finding that many people just cannot adjust to the > declarative and coupletely decoupled nature of a rule engine. The end > result is that Drools is used as a script execution framework. > > Felipe Piccolini wrote: > >> Mark, >> >> I could vote on this, I would vote no to the 'else'. The declarative >> thing about rule engines is that: no procedural code. So if you wanna >> do an 'else' condition you should re-think your rule and chack if its >> well writen. Of course this is just MHO. >> >> :) >> >> Tuesday, April 11, 2006, 6:09:22 AM, you wrote: >> >>> I thought about adding 'else' but I couldn't decide on the best way >>> to implement it, as there are several possabilities. Also 'else' is >>> not considered declarative, so its a kinda of code smell. I'll llook >>> into this again in 3.1 >>> >>> Mark >>> Geoffrey Wiseman wrote: >>>> On 4/10/06, Dmitry Goldenberg <[EMAIL PROTECTED]> >>>> wrote: >>>> >>>>> What is the timeframe for 3.1? Else/else if are very important to >>>>> what we're trying to do. >>>>> >>>>> I can see how I can to the following with the method described by >>>>> Geoffrey: >>>>> >>>>> if (A) then B else if (C) then D endif >>>>> >>>>> I also want to be able to do the following: >>>>> >>>>> if (A) then B else D endif >>>>> >>>>> I imagine that the rule would have to be written as a combo of >>>>> >>>>> if (A) then B endif >>>>> if (!A) then D endif >>>>> so that the conditions are complimentary... >>>>> >>>> Indeed, yes, that's how you'd handle it. >>>> >>>> If it does make it into 3.1, that's a good thing in terms of >>>> supporting the way people think, talk, and work in other languages, >>>> but fundamentally, the same capabilities are there now -- they just >>>> require more typing. >>>> >>>> - Geoffrey >>>> -- >>>> Geoffrey Wiseman >> -------------------------- >> Felipe Piccolini >> [EMAIL PROTECTED]
