title: Outlook-style rule engine
body: <p>I am trying to construct a rule-based system for interpreting data. However, I am having issues deciding on a way to construct the logic for storing and interpreting rules.</p>
  
  <p>Currently, there is a database structure that quite complex, but will deal with all aspects of storing the rule data. The idea is that the system will be able to mimic the way that MS Outlook allows a user to add rules.</p>
  
  <p>My problems are as follows:</p>
  
  <ol>
  <li>What pattern should I be using to store these rules inside objects?</li>
  <li>Should I use eval() or proper object orientation to execute the rules?</li>
  </ol>
  
  <p>And example rule might be:</p>
  
  <blockquote>
    <p>Dog <strong>must have</strong> collar in area <strong>park</strong></p>
  </blockquote>
  
  <p>Where each element (dog, must have, collar, in area, park) is a separate piece of logic to be interpreted.</p>
  
  <p>Any general advice to the above questions is much appreciated!</p>