Build your own CAB Part #6 - View to Presenter Communication

本文探讨了MVC模式中视图(View)与呈现器(Presenter)之间的两种交互方式:通过暴露IView接口事件来实现视图与呈现器间的松耦合,使视图易于测试;以及让视图直接持有呈现器的引用,简化开发流程。理想情况下,仅通过查看呈现器即可几乎完全理解屏幕的行为。
two ways:
  1. Expose the event off of the IView interface:  loose couple between view and presenter(the view does not know the presenter) and the view is easy to be test, ugly event handling syntax
  2. Let the view have a reference to the presenter. easy to develop
Ideally , you should be able to almost entirely comprhend the behavior of  a screen from looking at the presenter alone.

转载于:https://www.cnblogs.com/ellipse-gao/archive/2007/09/14/893381.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值