简体   繁体   中英

MVC architecture: discussion

I am creating an application using asp.net MVC. By default, the model, view and controller are all in the same project, but can I create different projects or class library projects for the model, view and controller, so I could manage them separately? Is it recommended?

You definitely can. This part of the point of MVC to allow you to have such flexibility. As far as whether it is recommended, it depends on what you are doing. It is not necessity; however I think there are definitely many scenarios where it makes sense. Although, this probably makes the most sense for the model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM