MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode?

Source: Internet
Author: User
MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode? MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode?

Reply content:

MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode?

Generally, the M layer of MVC is a data model and operation method. The C layer is responsible for calling the M layer and organizing data. The final data of layer V data ..

However! The code habits of each company are different and do not strictly abide by this. As you said. Building a data object in M is only an instantiated object in C, and the V layer is called. I have seen similar code styles in a few Japanese companies, which is also allowed. So nothing ~ You only need to write according to the unified rules.

I have also seen M only declare data, C operate data, V Process + output mode. It is also quite easy to write. The key is the company's

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.