2011年8月11日

对PureMVC(AS3版本) 的一些想法

摘要: 在PureMVC中,为了实现更加彻底的解耦,View中使用了Mediator,model中使用了Proxy,Controler中使用了Command,他们的通信通过Notification进行。Notification会激发Command的执行,也会激发Mediator中的handleNotification方法。 观察其源代码,在内部实现上,Controler中注册Command,实际上是在Controler中调用了View的registerObserver方法来注册观察者,传入自己的executeCommand方法作为回调函数。然后所有的notification都是传入了View的n... 阅读全文

posted @ 2011-08-11 11:13 Dongxue.xie 阅读(1194) 评论(0) 推荐(1) 编辑

导航