I'm about to design a programm, and for the user interface I choosed to use the MVC Pattern. Now the business code of the programm will be quite complicated with a lot of modules and functionality to controlled / accessed by the controller.
Now my thought is, it would be bad design if the controller would know all of these modules in order to call functions or change paramaters after user input.
My plan is to wrap the all functionality, that is to be controlled by the controller, into a facade class / adapter class, and then pass that class to the controller.
Now my question is: Is this a aceptable way to access my business code from a single controller ? And how would you handle a situation like this?
Thank in advance, Flo
Aucun commentaire:
Enregistrer un commentaire