• 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 question about updating the Model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: MVC question about updating the Model
      • From: Kyle Sluder <email@hidden>
References: 
 >MVC question about updating the Model (From: Matt DeFoor <email@hidden>)
 >Re: MVC question about updating the Model (From: Quincey Morris <email@hidden>)
 >Re: MVC question about updating the Model (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: How to empty the Trash programmatically?
  • Next by Date: Re: How to empty the Trash programmatically?
  • Previous by thread: Re: MVC question about updating the Model
  • Next by thread: Re: MVC question about updating the Model
  • Index(es):
    • Date
    • Thread