Re: [MVC Design] Model Controller Rationale?
Re: [MVC Design] Model Controller Rationale?
- Subject: Re: [MVC Design] Model Controller Rationale?
- From: "Kyle Sluder" <email@hidden>
- Date: Fri, 17 Oct 2008 15:47:04 -0400
On Fri, Oct 17, 2008 at 5:28 AM, Oleg Krupnov <email@hidden> wrote:
> Is there any benefit in introducing a model controller, as another
> layer of indirection between the model and the view controller? Or
> should all business logic live right in the model? In what cases
> having a separate model controller can be justified?
Your NSDocument subclass is a model controller. Think of the model as
being strictly the data your app works with -- all the NSStrings,
NSDatas, and other value types that compose a meaningful
file/document/whatever. Your NSDocument subclass is the controller
which manages all of that data in the context of the rest of your
application.
This manifests itself a bit subtly. For example, strictly speaking
your app's data has no way of knowing how to save itself. Your
NSDocument subclass, in its role as model controller, does.
--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