lundi 27 janvier 2020

Stuck with design pattern choice

I have to design a validating system for reports. Each report contains multiple widgets. The validation checks are simple range and null checks and custom checks. The return type of each widget is different.

User will select one report. Data in all the widgets for the report has to be validated. The final result has to be dumped.

Which report is selected, will be decided on the fly. Please help me find out suitable design patterns. I was thinking to go for factory pattern and decorator pattern. factory pattern for choosing appropriate widgets validation tool and decorator pattern for adding behaviour at run time and sequencing them.

Aucun commentaire:

Enregistrer un commentaire