On Oct 12, 2005, at 1:01 AM, Ben Fowler wrote:
A bigger problem is that some people and I am in this camp, probably wrongly, call the thin layer that mediates between the model and the view, or represents tools acting between them, the controller.
I have no objection to this layer being called the 'mediator' or 'arbitrator' (I think that this term is used in hot-plugging), or 'toolbox' or similar, particularly if this results in greater clarity or understanding.
The purpose of this layer is to ensure that there are no dependencies between the model and the view, and it may be quite complex.
Then it sounds like you're not actually talking about MVC here.
In classic MVC, the View would be bound directly to the model, with no layer in between. Also, that connection would be one-way (from model to view only).
Then the Controller is bound to a model, but with a one-way connection from controller to the Model.
In general the Controller and the View would both have tight dependencies on the Model. The Model, on the other hand, would have no clue as to what was actually connected to it.
The "mediator" is a different pattern altogether, though as with most patterns you will often get several in play at once with real software.
I've found this site to have a good, quick overview of some common patterns: http://www.dofactory.com/Patterns/Patterns.aspx
"Bridge", "Facade", and "Mediator" are some that are often quite helpful.