An active model per page?

xantrus's Avatar


22 Jul, 2011 08:39 AM

Is it a bad practice to have something like an active model, which changes when the current master view (page, resp.) changes? All of my models share a lot of properties, and lot of methods must be common to them so I was thinking of making them implement some interfaces. But then what? I do not want commands to go in and hook in the active model in every mediator because that would be stupid. Could there be something like a general model class which contains the active page model. Then, every mediator will be able to get that from the context. On the other hand, I do not want mediators to know about the general model, because that would introduce coupling. I have no idea what to do.

  1. 1 Posted by Michal Wroblews... on 29 Jul, 2011 12:38 PM

    Michal Wroblewski's Avatar

    Can be closed as the discussion has been moved to another topic

  2. Ondina D.F. closed this discussion on 01 Nov, 2011 02:02 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac