mercredi 5 avril 2017

Design an item filter module considering mutual exclusive conditions

As we all know, many shopping or searching websites allows the web display multiple filter conditions for users to choose, and choose again... In my project, i also have multiple filter conditions categorized into different classes, but some conditions(classes) are mutually exclusive, i.e. once a condition is chosen, its exclusive conditions shouldn't be displayed for further filter. My problem is should i hard code all these exclusive rules like 'if condition 1 then only show other allowed conditions' ? or can i design a few tables contain these conditions and their constraints so that i can display allowed conditions just by 'Select xxx from xx where **' or what is the best production practice to solve my problem?

Aucun commentaire:

Enregistrer un commentaire