Reputation: 2105
When I look at MVC diagrams I have this objection: why Controller is pictured facing user and View is hidden somewhere behind? In my opinion user sees and interacts with View (this is what he sees in browser) and via View user "talks" to Controller, so why Controller is first in line?
Also, shouldn't diagram be shown like tower structure (instead of triangle): View -allows user talking to- Controller - to- Model (on the bottom) - then (feed)back to- Controller -adjustment made to- View
When I see diagram with Controller facing user, I always have this strange picture of user, with a MVC diagram in one hand and screwdriver in another, popping computer's box open and looking for a Controller to get MVC started.
Upvotes: 1
Views: 758
Reputation: 26690
It's really unfortunate that most articles and books still use such useless diagrams to represent MVC. A more useful diagram for MVC is actually a UML sequence diagram like Dino Esposito uses on his book Microsoft .NET: Architecting Applications for the Enterprise
Secondly, as you point out, most MVC articles and books have not been updated to describe how MVC is applied nowadays in web applications and still talk about MVC as it was originally envisioned 20+ years ago.
The Esposito book that I mentioned has a really good chapter about this where he describes how MVC (as originally described) is dead and we should now be focusing in modern variations of it like Model2, Passive View, and Supervising Controller. I've got a review of this chapter on my blog that you might find useful.
Upvotes: 2