How Model, View and Controller communicate with each other in ASP.NET MVC?

There are following rules for communication among Model, View and Controller:

  1. User interacts with the Controller.
  2. There is one-to-many relationship between Controller and View means one controller can mapped to multiple views.
  3. Controller and View can have a reference to model.
  4. Controller and View can talk to each other.
  5. Model and View cannot talk to each other directly. They communicate to each other with the help of controller.
Tagged , . Bookmark the permalink.

2 Responses to How Model, View and Controller communicate with each other in ASP.NET MVC?

  1. Pallavi Jadhav says:

    why they cannot talk to each other directly?
    why they use controller as a mediator?
    Does this have to do something with memory or complexity?please let me know.
    M eager to know…
    Thank you…

    • As you may know, the Controller layer is, most of the time, tightly coupled to the View layer.
      The controller layer should act as a service layer to the view. So yes. The view must know about the controller.
      The controller is just a bridge between the view and the business rules layer. It calls business methods, format their responses properly (sometimes) and send back to the view. In this context, the controller can be a web service, a managed bean, a test suite, etc…
      This might help you. Please search on google, There will be lot of contents that explain your query…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.