• 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
Where in the MVC should my code go?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where in the MVC should my code go?


  • Subject: Where in the MVC should my code go?
  • From: Jean-Henri Duteau <email@hidden>
  • Date: Sun, 28 Feb 2010 00:09:04 -0700

I have an interesting MVC question that I would like some advice on.  I have a Model object with one attribute.  On my View, I display an array of strings that depend upon the value of the model's attribute.  I'm unsure where to put the "translation" of the Model attribute into the strings.  The model doesn't actually need this array of strings, so I'm predisposed to put it in the controller.  I don't have a good reason to not put it into the view other than pragmatic.  I can give the controller a bunch of attributes and bind the view's controls to those attributes, as opposed to programatically creating the strings in the view.

Advice?

Thanks,

Jean Duteau

_______________________________________________

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: Where in the MVC should my code go?
      • From: Matthew Lindfield Seager <email@hidden>
  • Prev by Date: Re: NSUndoManager for loaded documents
  • Next by Date: Re: Where in the MVC should my code go?
  • Previous by thread: Re: constructing an NSString with va_list?
  • Next by thread: Re: Where in the MVC should my code go?
  • Index(es):
    • Date
    • Thread