If I get this right than the function of the controller, it processes the POST data and technically makes changes to the state of the application (for example, the database) through the model.
As I understand it, View also gets data from the Model.
So this is how I understand the workflow:
Client request -> App Front Controller (if method = POST -> Controller ) -> View back to client
Here, Model used by Controller to read and write data and View to read data.
Thus, the controller is not used every time the page is loaded, in fact, only when application data is added / updated. In most cases, the controller shuts down.
So, why does almost every MVC resource say that the controller sends data to the views?
I am trying to write an application using the MVC pattern. Therefore, my applications always display data for the page from the Model. When the model is updated, I add a specific model update time to Memcache. At runtime, each scan looks at the latest update time (s) of the associated model (s), and the last time code for this view has been generated. If the model was updated before the cache was saved, review the read caches, otherwise it will be displayed again based on the updated model.
source share