As my Cocoa skills gradually improve, I try not to abuse MVC, as I did before, when I discovered that I was in a hole built according to my previous assumptions. I have no one here to bounce off of this, so hoping one of you can help ...
I have a custom Model class that has numerous and varied properties (NSString, NSDate, NSNumber, etc.). I need to serialize properties to pass. Sometimes, when this data is processed for serialization, questions may arise that the user will have to answer (UIAlertView, etc.).
Don't get caught up in too many features, where does this code belong?
- The Model says part of me because it is about saving data - in some way.
- Part of me says View because it is a different interpretation of the master data (no pun intended) contained in the model. And the user will sometimes have to interact with dialog boxes when processing data.
- Part of me is the Controller , as it controls the transformation of data between the model and the view.
Is this a combination of all three? If so, how will the relationship between the classes be processed during data processing? NSNotifications? Direct method calls?
source share