Originally posted by Michael Morris:
Another problem programmer's seem to run into quite often, similar to Thomas' example above, is the processing of input data with wildly varying styles and formatting I would guess that this scenario could be made easier using rules instead of hard coding all the possibilities of which you will always miss some.
Originally posted by Ernest Friedman-Hill:
I'm the developer of Jess, a Java rule engine. Michael was so kind as to ask if I'd start a thread here on rule-based systems (my particular interest.)
In Java (and in many other programming languages) the focus is on telling a computer precisely how to do something; the steps to follow, in what order. In a rule-based language like Jess, you tell the computer what you want done, and the run-time system (the rule engine) figures out how. This makes rule-based systems ideal for solving non-algorithmic problems like classification, control, workflow management, and for making subjective decisions.
Programming a rule-based system generally means writing rules in a special rule language. Jess's rule language is a sort of odd hybrid of LISP and Java; it's a very powerful and succinct way to describe conditions and logical relationships. Each rule is sort of like an if-then statement, although it's up to the rule engine to decide when to apply each rule. The Jess rule language gives you full access to all Java APIs from your rules; both the "if" and "then" parts of a rule can take arbitrary action on Java objects.
Rule-based systems are actually intimately related to relational databases; they share a lot of technology and concepts. Many rules engines are tuned for working with very large data sets, and because of the way they store and index data are vastly more efficient than hand-coded Java code would be at sifting through large volumes of information.
All that said: I'll open the floor to questions, and try to answer any that come up.
[ July 14, 2003: Message edited by: Ernest Friedman-Hill ]
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
Free, earth friendly heat - from the CodeRanch trailbosshttps://www.kickstarter.com/projects/paulwheaton/free-heat