Ask the controller in MVC what is the use? what is the difference with the model?
Source: Internet
Author: User
What is the purpose of the controller in MVC? what is the difference between it and the model? I just learned the MVC framework. What I cannot understand is that the controller. what I understand is that the model layer is the processing page of the background, and the view layer is the front-end. what is the use of the controller on the page? I have read the analogy of "restaurant order" in the book, but I still don't know which part of the controller is used in website development. could you tell me how to use the controller in MVC? what is the use? what is the difference with the model?
What I just learned about the MVC framework is hard to understand is the controller. I understand the model layer as the backend processing page view layer as the front-end page. what should I do with the controller? what is the metaphor of the book "restaurant order "? I have read it, but I still don't know which part of the controller is used in website development. please give pointers and use the actual website development as an example to describe it here. thank you!
------ Solution --------------------
MVC has no clear division of labor among members.
So what do you do is correct
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.