Re: MVC question about updating the Model
Re: MVC question about updating the Model
- Subject: Re: MVC question about updating the Model
- From: Quincey Morris <email@hidden>
- Date: Fri, 16 Apr 2010 11:24:27 -0700
On Apr 16, 2010, at 11:00, Kyle Sluder wrote:
> And this is when I become a fan of splitting the "model" layer into a
> "model object" layer and a "model controller" layer.
I think that in this case, if the auto-updating can *safely and correctly* be encapsulated within a single object, then it's preferable and simpler just to do so.
However, I think I'd agree even in this case, that a public [myModel updateResources] method is preferable to [[myModel someParticularObject] updateResources], so that it's a private implementation detail precisely where in the model the update is done. That would be a small but very appropriate use of the Sluder Splitting Principle.
_______________________________________________
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