开发者

How many projects in a solution is too many?

How many开发者_开发问答 projects in a single solution is acceptable? And for those apps that have large project numbers do you put the other compiled dlls in some common folder to be able to run the app?


Since in Visual Studio a project compiles to an assembly, the question you should ask yourself is "how many assemblies should I have?"

If there's no reason for the assemblies to be used separately, there should be no reason to have them split in several projects. If you have several assemblies to enforce layering, that's what namespaces are for.

In an ideal setup, you should have one project (= one assembly) for each different host in your application, and one for your non-host specific logic.

YMMV though, you may want to split projects according to who is working on the different parts, but really, try to limit the number of projects in your solution (as I'm writing this, I'm struggling with a 70+ projects solution, so I'm talking from the abysses of my personal experience).

A interesting discussion on logical/physical layering of applications can be found on Patrick Smacchia's blog (for instance http://codebetter.com/blogs/patricksmacchia/archive/2008/02/10/layering-the-level-metric-and-the-discourse-of-method.aspx )


Well, 42, of course!


There is no right or wrong answer to this. Some developers like to create multiple projects within the main project. Others like to compile to an assembly (the dll) and reference back. It depends on your team and workplace.


I agree with the answers so far. One additional criterion is the speed of rebuilding the solution...


I think this is something that depends on the size and type of your projects . but from my own experience when my number of projects is more than 5 the build process will take long . so I try to keep projects that I do not need to change frequently in another solution in order to make the build process faster .


As long as each project is a valid, separate functionality, and all the projects are closely coupled (as far as purpose goes), then it isn't a problem.

What I do, is I have a "Libraries" project where I put all my external DLLs, then reference them directly there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜