Re: Where in the MVC should my code go?
Re: Where in the MVC should my code go?
- Subject: Re: Where in the MVC should my code go?
- From: Jean-Henri Duteau <email@hidden>
- Date: Mon, 1 Mar 2010 15:57:24 -0800
On 2010-03-01, at 3:20 PM, Chase Meadors wrote:
> 2. On the other hand, if you want the view to be more independent and
> flexible as according to MVC, you have more options. If you're binding
> the model to the view, you can simply use a custom NSValueTransformer
> class to change your model attribute to an array of strings. Or you
> can simply factor the code into the view controller in any way you wish.
In the end, that's what I ended up doing. I created a Value Transformer and in my ViewController, registered the 15 different instances of the transfomer and gave them different names. This ends up being the best separation of concerns - neither the view nor the model know about these transformations and I have one class to consult to change the code.
Thanks to everyone who contributed suggestions. The process of reading the responses and understanding them allowed me to finalize on my solution.
Jean_______________________________________________
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