Re: Is slowing down bindings updates possible?
Re: Is slowing down bindings updates possible?
- Subject: Re: Is slowing down bindings updates possible?
- From: Kyle Sluder <email@hidden>
- Date: Wed, 18 Jan 2012 16:53:40 -0800
On Wed, Jan 18, 2012 at 4:33 PM, Ken Thomases <email@hidden> wrote:
> On Jan 18, 2012, at 6:12 PM, Marcel Weiher wrote:
>> On Jan 14, 2012, at 18:37 , Kyle Sluder wrote:
>>> Breaking this pattern should be a conscious decision.
>>
>> I'd say that the opposite is true: in general you should avoid specific model -> view communication as per MVC (apart from invalidation), but in specialized and very simple cases you may be able to get away with it.
>
> KVO and bindings are not "specific model -> view communication", they are a generalized mechanism which avoid coupling. The model just supports a generalized observer pattern. It doesn't know anything about its observers; it doesn't even know or care whether there are any.
And, importantly, the exact same observer interface can be used by
view objects, controller objects, or anything else.
We often have controller-layer objects that interpose between our
views and model objects. But there's no sense _forcing_ this
arrangement if it offers no benefit.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden