Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
429 views
in Technique[技术] by (71.8m points)

.net - What is better, many small assemblies, or one big assembly?

All is in the title :)

Currently, we have a VS2005 solution with 20+ projets. Like

MySolution
MySolution.Modules.Foo
MySolution.Modules.Bar
[insert many here]
MySolution.Modules.Baz

Can there be a harm to "merge" MySolution.Modules.* in one project ? All namespaces will be preserved, so no problem here.

But is there anything I didn't think about ?

Note : Currently, there can't be circular references : if MySolution.Modules.Foo references MySolution.Modules.Bar, MySolution.Modules.Bar can't reference MySolution.Modules.Foo. So we'll have to be careful not to create some.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have been in a couple of companies where having far too many projects has been a pain in various ways. I haven't yet been anywhere which had too few projects, although that's certainly possible.

Think about a project as a unit of reuse, amongst other things. Is any product going to need Foo but not Bar, or vice versa? If not, merge them together.

I like to keep different layers (presentation, business logic, data access) apart, and it's nice to have a common, product-agnostic utility library, but that's about it in many cases.

Oh, and keep tests in a different project to your production code, of course :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...