• 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: Why is it like this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is it like this?


  • Subject: Re: Why is it like this?
  • From: Raffael Cavallaro <email@hidden>
  • Date: Tue, 31 May 2005 08:44:49 -0400


On May 30, 2005, at Mon, May 30, 10:57 10 PM, Andy Lee wrote:

It would be convenient for the objects to have methods like -stringToDisplayInXYZBrowser and -stringToDisplayInABCContextualMenu, but this means model objects would be aware of the specific views they will be displayed in.


One solution would be to have more abstract methods in the Model class - for example -shortString -longString. Then each view's Controller class would call -short/longString as needed.

Another would be a hybrid approach: "Hybrid Models: MVC, strictly observed, is not advisable in all circumstances. Sometimes it’s best to combine roles. For instance, in a graphics-intensive application, such as an arcade game, you might have several View objects that merge the roles of View and Model. In some applications, especially simple ones, you can combine the roles of Controller and Model; these objects join the special data structures and logic of Model objects with the Controller’s hooks to the interface." So you might keep your hypothetical -stringToDisplay… methods in a hybrid Model-Controller class.


regards,

Ralph

email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [digression] Why is it like this?
      • From: Andy Lee <email@hidden>
References: 
 >Re: Why is it like this? (From: Gregory Weston <email@hidden>)
 >Re: Why is it like this? (From: Thomas Davie <email@hidden>)
 >Re: Why is it like this? (From: Gregory Weston <email@hidden>)
 >Re: Why is it like this? (From: Thomas Davie <email@hidden>)
 >Re: Why is it like this? (From: Aaron Fothergill <email@hidden>)
 >Re: Why is it like this? (From: Andy Lee <email@hidden>)

  • Prev by Date: DO behavior depends on server launch
  • Next by Date: Re: Cocoa binding question
  • Previous by thread: Re: Why is it like this?
  • Next by thread: Re: [digression] Why is it like this?
  • Index(es):
    • Date
    • Thread