Passive-view MVC or whatever you want to call it, is still MVC. Notice Alex, that you specifically declared it as not MVC - which is misleading. It is also not a derivative, since MVC is a pattern and you are talking about differences in implementation. The pattern does not enforce either way of doing things.
http://martinfowler.com/eaaDev/PassiveScreen.html
pytrin: I have to disagree with you about that one sentance. MVC is the commmon buzzword and everyone uses it. Passive view is a variation or derivative considering it's not identical to MVC in terms of interaction (only in SoC), just as MVP is slightly different but they should not be called MVC -- otherwise wide spread confusion will continue to propagate). I'm also not talking about difference in implementation, I am talking about the interactions of each component in the MVC triad.
If you're still going to keep claiming they are distinct patterns could you at least highlight the differences that you see?
The difference are the dependencies and their interactions, I have stated this several times:
Classical MVC:
Passive View:
Like I said the important dependency in almost any definition of MVC is the model should not depend on the presentation. (not so much as an important dependency, but a
forbidden dependency).
In passive view, the model and view have no dependency on each other, or the controller. The controller creates the model, queries it, and creates the view and initializes it with the data required for display. The if the view used the model directly, would there not be a solid/dotted line indicating a indirect/direct association just as the classical MVC diagram clearly shows?
I don't see how letting a view be an 'observer' of the model changes anything or breaks the definition of the original 'MVC' pattern.
Where did I say it breaks the original MVC pattern? It does however introduce an observer to the mix, which passive view doesn't have.
Maybe you could explain to us why you choose to interpret the patterns in this way (which contradicts with lots of literature I've read)
Maybe it is your interpretation of the literature that is incorrect?
Passive view has three components (Model-View-Controller) just as MVC but as the diagrams above should clearly
demonstrate, the interaction between components (and thus dependencies, etc) are slightly different, and by different I mean minimized, as both classical MVC and passive view the
controller have direct knowledge of the model and view, that is where passive view stops and classical MVC continues with additional direct and indirect associations via observers.
To call them both MVC would clearly cause confusion (look at this discussion), additionally why would Fowler introduce the term passive view and just call it MVC?
You are implying you can list lots of differences, can you do so for us? (stating that passive uses observer pattern and "classic" does not is a given, and is the only
difference we will probably agree on)
Oddly you use the term
"can you do so for us" and
"we will probably agree on". Hardly anyone else has participated in this discussion, where is all your support coming from exactly?
Also I never stated
"passive view uses observer pattern and 'classic' does not is a given". Actually, that is the complete opposite of the truth, so I hope no one agrees with. Classical MVC uses observers Passive View doesn't need too.
Cheers,
Alex