A general question on model-view-presenter (C#), should the model know the presenter?

I have a MVP (passive view) setup, and it is going quite well. I recently read Martin Fowlers description of this (http://martinfowler.com/eaaDev/PassiveScreen.html) and he writes "Another advantage that Passive View is a very explicit mechanism. There's very little reliance on Observer mechanisms or declarative mappings."

In my MVP I have my model completely oblivious of a presenter, and communication from the model to the presenter is handled by events. I initialize my MVP in the view by calling the presenter ctor e.g. new Presenter(this, new Model()) (where this refers to the view).

My question is, should I make the model aware of a presenter such that it can invoke presenter logic directly instead of using events?

5
задан lejon 28 September 2010 в 11:45
поделиться