views:

40

answers:

0

Hi,

I'm slightly confused about the controller-model relationship in MVC.

Should a controller be able to access any model in the system or should it have a 1:1 relationship with a specific model? Both options seem to present problems:

If the relationship is 1:1 obviously if something elsewhere needs to be updated it can't for example updating a window title from outside the window triad. So should models have access to other models (And how do they find them?)

If it's not 1:1 and the controller can access any model, how are these usually accessed (service locator?) and what if there needs to be more than one instance of a specific model.

I'm a bit confused! Thanks for any help.