Experience-how the project is divided into modules (MVC)

Source: Internet
Author: User

In general, there are only two cases:
If we have a project that looks like this:
Look for one, like a group of us:

    • Sub-module according to MVC

      • Root directory Controller

        • Buy
        • Door
        • Business
        • It's mine
        • More
      • Model

        • Buy
        • Door
        • Business
        • It's mine
        • More
      • View
        • Buy
        • Door
        • Business
        • It's mine
        • More
    • Divide MVC by module

      • Buy
        • Controller
        • Model
        • View
      • Door

        • Controller
        • Model
        • View
      • Business

        • Controller
        • Model
        • View
      • It's mine

        • Controller
        • Model
        • View
      • More

        • Controller
        • Model
        • View

We are now to compare, of course, two models have a company in use, we can not say to the company, see such a division, it is very surprised, ordinary heart treatment.

    • If the first division of the way, such as: Our business view needs to tell the controller (proxy, etc.), or the controller needs to transmit value and so on. Then have to go to such a large pile inside to find the corresponding controller, is not feel a little bit inconvenient.
    • Then the second relatively, it solves the problem, so according to my personal advice, I choose the second kind, of course, we also do not too tangled, follow the company.

Experience-how the project is divided into modules (MVC)

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.