generic MVC question



[ i'm not sure where else to discuss this. if anyone has some
  ideas on good MVC forums, let me know. thx. --p ]

suppose you have a combined View+Controller.

you use the Controller to attempt to change the Model. this usage
changes the appearance of the View. the attempt to change the Model
fails for some reason (e.g. an illegal value).

what causes the View to be reset to the correct state? 

i ask because in a genuine MVC model, you never update the View based
on the return value of a modifier function - the View is updated when
notified of a change in the Model. in this case, there is no change in
the Model, but the View is "stale" because it was modified to reflect
what was happening in the Controller.

if you combine View+Controller, do you have to always check for result
of a Model modifier function, and reset the View if the function
failed? or is there some better paradigm for this that i'm not seeing.

--p




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]