I need a rules based system

Posted on 2006-05-27
Last Modified: 2012-05-05

I am wrestling with how to create a system with a multitude of user options which can be turned on or off by the user and have various type of values associated with different rules, each value having potentially different meaning as it relates to a different option.  I imagine providing the user with a list of rules, each with an associated checkbox to turn the rule on or off.  Then when checked, various other controls become active and which allow the user to set specific parameters associated with a certain rule.

Then I need to find a way to incorporate the rule into the code which will turn on, off, or regulate, the rule.  I'd like to find a standard way to handle this kind of user interface on the back end.  In other words, I'm satisfied that I can easily make the user interface with a list of user based rules, and the associated paramters.  The hard part is to find a way to structure a rules object so that it interacts with the code doing the work, on the back end.

Has anybody got any ideas how I could design the rule object(s) and their interactin with the code which will be selectively turned on, and off?  I'd like there to be some kind of standard obviously, and I'm at a lot for ideas how to do this.

I expect to create a Rules table, which will be read in upon startup, but don't yet know what columns to create in the Rules table.  There would need to be as much information stored in the Rules table so that 100% of the Rules objects can be instantiated at start-up.

Thanks for any help,
Question by:ba272
    1 Comment
    LVL 37

    Accepted Solution

    Take a look at ther specification pattern includes some examples .. A full description of the pattern (and examples) can be found in Domain Driven Design by Eric Evans and in Applying Domain Driven Design and Patterns by Jimmy Nilsson.


    Greg Young

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    In one of my recent projects, I was working with IP cameras, I need to take some pictures from the camera and do some processing on it. The first step, was to retrieve the image from camera into Image object. So that it can be displayed or …
    Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video discusses moving either the default database or any database to a new volume.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now