MVC 的 Pull 和 Push 类型的区别
2010-04-01 10:40
204 查看
MVC Push:
This is where the framework creates context objects what are "pushed" or made available to the templating language like JSP's allowing them either via tags or scripting to get their values and dislay them on the page. Struts and Expresso a good examples of this. In Expresso you create Output objects that are made just for rendering the View
MVC Pull:
This is where you have one or a few objects that are made available to all templates. The big difference is the java developer does not need to create any sort of output object, they just make backend model objects available to the View templetes. WebWork and Maverick are a good example of this, they a provide accessor methods(getters) in their Action classes that allow the View to "pull" whatever they like as long as they know of the API for that Action.
参考文档:
http://www.theserverside.com/patterns/thread.tss?thread_id=22143
This is where the framework creates context objects what are "pushed" or made available to the templating language like JSP's allowing them either via tags or scripting to get their values and dislay them on the page. Struts and Expresso a good examples of this. In Expresso you create Output objects that are made just for rendering the View
MVC Pull:
This is where you have one or a few objects that are made available to all templates. The big difference is the java developer does not need to create any sort of output object, they just make backend model objects available to the View templetes. WebWork and Maverick are a good example of this, they a provide accessor methods(getters) in their Action classes that allow the View to "pull" whatever they like as long as they know of the API for that Action.
参考文档:
http://www.theserverside.com/patterns/thread.tss?thread_id=22143
相关文章推荐
- 总结MVC中push和pull的区别
- 解决本地上传远程的冲突两种方式的区别:git push -f origin master和git pull --rebase origin master
- GPIO中Open-Drain与Push-Pull之间的区别
- 单片机I/O口推挽输出与开漏输出的区别(open-drain与push-pull)
- JavaScript引用类型之Array数组的concat()和push()方法的区别
- 3.1.3 值类型与引用类型的区别
- ASP.NET MVC – 关于Action返回结果类型的事儿(上)
- Git fetch & pull 区别
- MVC和MVP的区别
- [转] 消息系统该Push/Pull模式分析
- 专家答疑:ASP.NET MVC与WebForm的区别
- 三层与MVC的区别
- Java学习之基本数据类型和引用数据类型区别
- ZeroMQ(java)之push/pull模式
- git fetch和git pull的区别
- oracle中Blob和Clob类型的区别
- 选择Data类型在Access与Sql中的区别
- 三层架构和 MVC的区别
- git push和git pull的默认行为
- WebApi和MVC的区别