MVC, in the M layer building class, C layer new corresponding class of objects, and then to the V Layer, V layer using the object calls the corresponding class method, have you seen this mode?

Source: Internet
Author: User
MVC, in the M layer building class, C layer new corresponding class of objects, and then to the V Layer, V layer using the object calls the corresponding class method, have you seen this mode?

Reply content:

MVC, in the M layer building class, C layer new corresponding class of objects, and then to the V Layer, V layer using the object calls the corresponding class method, have you seen this mode?

MVC generally on the M-layer is the data model, the operation method or something. The C layer is responsible for invoking the M-layer stuff and collating the data. V-Layer Data final data:

But! Each company's code habits are different and will not strictly abide by this. It's like you said. In m building the data object, in C just instantiating the object, the V layer is specifically called, I have seen in a few days similar code style, is also allowed. So nothing ~ just follow the rules of the unified to write on the line.

I've also seen m just declaring data, C going to manipulate the data, v processing + output mode. The writing is also very handy. Key look at the company's

  • Related Article

    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.