• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [MVC Design] Model Controller Rationale?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: [MVC Design] Model Controller Rationale?
      • From: John Velman <email@hidden>
References: 
 >[MVC Design] Model Controller Rationale? (From: "Oleg Krupnov" <email@hidden>)

  • Prev by Date: Re: notification of NSSlider end of tracking
  • Next by Date: Delete myDriver.kext files from normal user.
  • Previous by thread: [MVC Design] Model Controller Rationale?
  • Next by thread: Re: [MVC Design] Model Controller Rationale?
  • Index(es):
    • Date
    • Thread