jeudi 23 avril 2015

How to handle lengthy conditionals decisions in programming

I have a problem where i'm submitting a form and prior to submitting the form i have to define certain criteria for that form which means when the form is submitted it goes through the criteria and if the criteria is met it performs an action.

Now it leads me to a lot of if/else conditions and i'm wondering how can i avoid this because i'm considering performance issues as well. Is there any design pattern suitable for this also how should i store the data. What data structure should be useful in this case.

Aucun commentaire:

Enregistrer un commentaire