Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

.net

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.

like image 906
mathieu Avatar asked Feb 20 '09 08:02

mathieu


Video Answer


1 Answers

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 :)

like image 181
Jon Skeet Avatar answered Nov 16 '22 02:11

Jon Skeet