where should we send notification for updating many views?

Posted by Thanh-Cong Vo on Stack Overflow See other posts from Stack Overflow or by Thanh-Cong Vo
Published on 2010-05-21T08:54:33Z Indexed on 2010/05/21 9:00 UTC
Read the original article Hit count: 422

Filed under:
|

Hi all,

I want to ask about software design. I have a task, the view controller handles UI event for calling a model manger to perform that task. After finishing, the model manager will callback to update the view. There have also other views who care about that task, and also want to update its own view when that task is finished. So I register a Notification for that task in each views. The problem is defining where should I send Notification, in Model manager or in the View who handles event and receives the callback from Model manager? What is better design? Shoud the model care about send this "common" task, or shoud the view?

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about design-patterns