开发者

Where to put third-party plugins/libraries in ASP.NET MVC

开发者 https://www.devze.com 2023-01-23 01:43 出处:网络
开发者_StackOverflow中文版I\'m using the markItUp! jQuery-based editor in an ASP.NET MVC project.I understand the purpose of the various default folders in ASP.NET MVC, but I\'m not sure how a third-p
开发者_StackOverflow中文版

I'm using the markItUp! jQuery-based editor in an ASP.NET MVC project. I understand the purpose of the various default folders in ASP.NET MVC, but I'm not sure how a third-party plugin like markItUp! fits into this structure.

markItUp! has its own images, CSS files, and scripts, but instead of separating those files into the existing project folders (Content, Scripts, etc.), I'd like to keep everything together. There are 2 reasons for this:

  1. Distinguishing between my own code and the code of the markItUp! library.
  2. Upgrading to a new version of markItUp!

Should I create a new folder called "Libraries" (or "Plugins" or "ThirdParty") and place the top-level markItUp folder inside? That way I could also add other third-party code as needed.


I began to replace Content and Script folders with a folder structure similar to this:

  • Public
    • Css
    • Scripts
    • Images
    • ...
    • fancybox
    • markitup

The reason why I put it all in a folder called "Public" is that in contrary to Views or Controller folder there are only directly accessible files in it.

I think it makes sense to put third party pugins in its own folders. I do it without some "plugins" folder inside the Public folder mainly to get shorter urls.

0

精彩评论

暂无评论...
验证码 换一张
取 消