Under an MVC framework, which directory structure would be expected by other developers?

后端 未结 4 509
谎友^
谎友^ 2021-01-13 01:32

Generally, MVC frameeworks have a structure that looks something like:

/models
/views
/controllers
/utils

However, in a web application sui

4条回答
  •  迷失自我
    2021-01-13 01:52

    If your apps share data, it could make sense (to me) to group the models together.

    However, for the views and controllers it probably makes more sense to keep them separate, since I'm assuming they have separate business logic and presentations.

    Further, if your apps are kept separately in version control (you are using version control, right? :), that makes the first or third option difficult to implement.

    So all things considered, I'd probably separate the apps at the top level, as in your second example.

提交回复
热议问题