MVC 的 Pull 和 Push 类型的区别

 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值