On Wed, Jan 18, 2012 at 4:33 PM, Ken Thomases <k...@codeweavers.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to