java - MVC 中的推与拉模型

标签 java spring-mvc struts2

MVC 的推拉模型有什么区别?

Struts2、Spring MVC是基于Pull的吗?

最佳答案

根据 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.

具体来说:

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.

关于java - MVC 中的推与拉模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17441926/

相关文章:

java - 使用 Spring 进行 session 复制会导致 NotSerializedException

java - Camel @BeanInject 在蓝图测试中不起作用

java - 如何让 Java 在我的场景中检测按键?

ajax - 如何在没有表单的情况下通过 ajax 传递 struts2 token ?

java - 在Spring中定义java.io.FileInputStream的bean使得Struts2流结果不起作用

java - 如何在eclipse中用字符串替换字符串组

java - 检查请求日期是否在特定时间内的简单方法。使用 for 循环和 if 语句

java - 登录后重定向到自定义网址

Angular 4 + webpack + spring mvc (not boot) 在tomcat上集成部署

java - REST API 插件 - 使用正文而不是查询字符串作为参数