On Fri, Oct 17, 2008 at 5:28 AM, Oleg Krupnov <[EMAIL PROTECTED]> 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 (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 [EMAIL PROTECTED]

Reply via email to