Push vs Pull Model in MVC

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

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

Is Struts2, Spring MVC Pull based?

4条回答
  •  一向
    一向 (楼主)
    2021-02-09 17:27

    Sorry .. I dont think that struts 1, struts 2 and spring MVC can be taken as PUSH MVC ..

    as both of all frameworks use a front controller[Filer class for Struts , And Controller Listener for Spring ] defined in their respective deployment descriptor. Now both of all these frame work save the form data in their respective bean[Or model] object using that controller by reflection.

    Now from our Action Controller we can receive the bean object and will get the values but in the front controller where the bean object[or model] is actually generated set the value in their resperctive field by using request.getParameter(param) or request.getParameterValues(param) methods internally.. So this can be considered as PULL.

    So as per my thinking we can say that These framework can use two layers namely PULL layers used by end programmer and PUSH layers used by framework base classes.

提交回复
热议问题