I have a question in mind for the MVC pattern for a long time now. When using the Post/Redirect/Get principle then it doesn't make sense to use ONE model in the sense of MVC, right? Why should I modify the data in the model if I don't use it anymore? Am I missing something?
So I need one model for the actions in the controller and one with the data for the view?
My current pattern:
controller
-> call model used for actions
-> handle actions, if an action has been executed, use P/R/G to reload
-> call model used for the view
-> call view with template
Aucun commentaire:
Enregistrer un commentaire