Push vs Pull Model in MVC

前端 未结 4 597
伪装坚强ぢ
伪装坚强ぢ 2021-02-09 17:05

What is the difference between the push & pull models of MVC?

Is Struts2, Spring MVC Pull based?

4条回答
  •  长情又很酷
    2021-02-09 17:28

    According to Struts2 Interview Questions and Answers

    Struts2 is a Pull-MVC based architecture, in which all data is stored in Value Stack and retrieved by view layer for rendering.

    Specifically:

    In case of Push-MVC the data (Model) is constructed and given to the view layer by the Controllers by putting it in the scoped variables like request or session. Typical example is Spring MVC and Struts1. Pull-MVC on the other hand puts the model data typically constructed in Controllers are kept in a common place i.e. in actions, which then gets rendered by view layer.

提交回复
热议问题