0

I am developing an document based application using MVC pattern, my model object is Mutablearray of mutableDictionaries. Each dictionary in the array is represented to the user by a View object. (for example if the array contain 100 dictionaries then 100 views will be addsubviewed to self.view)

I learned that in MVC pattern the view and model should not know about each other instead they must respond via a Controller object(UIViewController).In my application I followed the MVC pattern but I did not follow the one I mentioned here because by holding a reference to the model object(NSMutableDictionary) I can easily modify the model object(as the user edit the view object) and then write the array of NSMutableDictionaries on the disk after the user finished the document.

Tell me If I should isolate model and view if so what benefit I can avail or I can go on with that

vignesh kumar
  • 2,310
  • 2
  • 25
  • 39
  • Can you explain more about why do you need holding a reference to Modal from View? As far as I know, I don't think you have to do that. – brianLikeApple Dec 05 '13 at 11:02
  • @brianLikeApple because each view is different kind so editing each view will affect the model in different way so instead of dumbing all my code in viewcontroller I want to write it in the view subclass so that can responsibilities of the viewcontroller will be shared with the view objects – vignesh kumar Dec 05 '13 at 11:47

0 Answers0