I'm very new to MVC, and I would like to get a clarification about the function of a controller.
Imagine this primitive example:
I have 2 models and 1 controller, that gets data from both models, and I have to do a very complicated calculation with these 2 data packages. (Then give the result to a view.)
My question is:
Should I put this complicated calculation into the controller, or should I put it outside into a library? In more general form:
Am I allowed to make calculations inside a controller, or is it a bad practice?