开发者

ASP.net application organization question

What is the preferred way to organize your asp.net web application? Here are the two choice I have:

  1. have one bin/ directory with all the dlls in it and one main dll. This case would require a rebuild each time any server code has been changed. Obviously, there may be several directories, but there is only one BIN

  2. can have several bin directories (say one per each directory). The advantage here is that each directory is its own app - but other than that it seems pretty messy to me.

What is the开发者_JS百科 best option? If I go with option 1) can I have Web.config file contain settings for several apps?


Ive never had to use multiple bin folders - not sure why you would want to. IIS will load all the dll's it finds in there and Ive never had any perforamnce issues - even with things like sharepoint that has heaps.

Having multiple config files is quite useful and valid.

HTH

Cheers


Your website should ultimately have one bin directory, but it is common to have multiple bin directories in a Solution with multiple projects.

By way of your website adding a project reference to the other projects, or by post build dll copies, the required dlls can end up in your website bin.


The only thing I would add to Jonesie's answer, is if you want to maintain some sort of modularity, then create different projects so that you have separate namespaces - thus separate directories. Beware though, this means you need to deploy them separately unless you have some sort of build automation in place.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜