I am using a PHP framework (transitioning from Zend Framework to Zend Expressive), and I have something like the following:
I have a product that has various models and customizations, and depending on those, different things are to be displayed. Below is for sample only:
- For models X, Y, Z, variable V54 is to be shown, with a specific description
- For models A, B, C, variable V54 is to be shown, but description is different
--
- For models X, Y, Z, value V54 is to be shown to 2 decimal places
- For models A, B, C, value V54 is to be shown to 3 decimal places
--
- For models X, Y, Z, variable V56 is to be shown only for 2-rotor products, and value to be reduced by 0.1
- For models A, B, C, variable V56 is to be shown for 2-rotor products, as is
--
- For models X, Y, Z, variable V58 is not shown
- For models A, B, C, variable V58 is shown
etc.
Do those rules go into the view, where I can use if/then/else statements, or do I try to compress them into the model/other layer?
How do I deal with something like this?