Communication between the View and Model in MVC

后端 未结 1 1522
孤独总比滥情好
孤独总比滥情好 2021-02-14 07:24

After reading from many different sources, I am very confused about how View and Model should communicate in the MVC pattern. To my understanding, the accepted answer of this po

1条回答
  •  梦谈多话
    2021-02-14 07:59

    There is more than one answer. Eventually you can do whatever you thing suits your needs. I use a controller + ViewModels to connect to the view. The view never use the model. just what the controller gives him.

    There is a nice explanation of all models in steven sandarson book, Page 49 (variation on MVC).

    0 讨论(0)
提交回复
热议问题