mercredi 24 novembre 2021

Traditional MVC design pattern

I have several questions about the Model-View-Controller architecture. I am a bit confused with all the conflicting information and different diagrams on the MVC pattern I've found on the Internet.

  1. Is the diagram below a correct representation of the MVC flow between the layers? If so, is View allowed to update Model directly not via Controller? enter image description here
  1. What is the difference between the passive Model and the active Model and how does each of these variations impact the Model change propagation to Controller and View?

  2. How is the new data fetched to both View and Controller after Model update (with and without Controller interference in Model update)

3a. (active Model - observers, notifications) Are both View and Controller notified each time Model updates and they get the new data from Model?

3b. (passive Model - no notifications) Does Controller receive updated Model state after it delegates Model update and notifies View about Model change?

I would be grateful for any piece of help with understanding the MVC.

Aucun commentaire:

Enregistrer un commentaire