MVC中的Push vs Pull模型 [英] Push vs Pull Model in MVC

查看:251
本文介绍了MVC中的Push vs Pull模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

推送和推送之间有什么区别?拉模型的MVC?

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

Struts2,Spring MVC Pull是基于什么的?

Is Struts2, Spring MVC Pull based?

推荐答案

根据 Struts2访谈问题与解答


Struts2是基于Pull-MVC的架构,其中所有数据都存储在Value Stack中,并由视图层检索以进行渲染。

具体来说:


在Push-MVC的情况下,数据(模型)由控制器构建并通过将其放入范围内而提供给
视图层变量
像请求或会话。典型的例子是Spring MVC和Struts1。
另一方面,Pull-MVC将通常构造的模型数据
保存在一个公共位置,即在动作中,然后
由视图层呈现。

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.

这篇关于MVC中的Push vs Pull模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆