ASP.NET MVC Default Project Structure and the Scripts Folder

前端 未结 2 1200
小鲜肉
小鲜肉 2020-12-20 20:32

Is there any advantage to leaving the Scripts folder where it is in the default ASP.NET MVC Project structure.

In my mind it makes more sense to create subfolders fo

相关标签:
2条回答
  • 2020-12-20 21:29

    In short, no, there is no real downside to doing this. It is how I have been structuring my MVC projects.

    There are some advantages to doing this, actually... on many projects I am serving up all of the static content from a separate domain, so grouping all of the static content into a single folder has made the QA/production deployment process much easier (since we are scripting deployments with MSBuild and calling out to minify utilities for the CSS and Javascript files).

    0 讨论(0)
  • 2020-12-20 21:32

    Minor downside is having to look in multiple places for the 'bits' of each add-on framework etc. you may have. Hence, I prefer \assets\ - then within each framework folder (jquery, bootstrap etc) I have all the .JS & .CSS etc files and/or subfolders that come with that product. However, MVC bundling helps by allowing you to have all your references in the one BundleConfig module/class if you wish.

    0 讨论(0)
提交回复
热议问题