Push vs Pull Model in MVC

前端 未结 4 577
抹茶落季
抹茶落季 2021-02-09 16:47

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

Is Struts2, Spring MVC Pull based?

4条回答
  •  梦毁少年i
    2021-02-09 17:31

    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.

提交回复
热议问题