our main client solution has 111 projects. When I first started on this team I was surprised (and alarmed) that we had so many projects and recommended consolidating the tiers into less but larger assemblies. our structure has models (DTOs) with nhibernate mapping files, and WCF services tier with data controller calls, some framework type projects, and a winform CAB app with multiple modules. we will be using click-once deployment.
because of the build time (up to 15 minutes worst case) some other team members are now concerned as well. I don't have empirical evidence that less projects are a good idea and was wondering is the stack overflow community had any feedback. Is there compelling reasons to alter our solution structure to consolidate projects? will we run into trouble having 100+ assemblies deployed using click-once? Does more assemblies cause slowness when loading and invoking method calls? Any limits we might run into that could corrupt things?
The biggest problem with having many projects in a single solutions (in particular when there are many interdependencies between the projects) is that the compile time will slow down real quick. I have seen compile times go to several minutes to tens of minutes when project numbers grow this large.
Application startup may suffer as well, if 100 assemblies need to be loaded and initialized. This of course assumes that all 100 assemblies are needed by the application.
Such a large number of projects hints at code organization problems as well. I would call this a definite code smell. It looks like an attempt at decoupling that goes beyond the reasonable - a bit of architecture astronaut-ism, at a guess.
I would not worry about the deployment story, as deploying one assembly into a directory is not much different from deploying 100 into one directory... Of course, deploying 100 assemblies via the web will be slower (100 connections instead of 1, probably the have a larger size...).
There are tools that will merge multiple assemblies which can help with this - the best known is from Microsoft - ILMerge.
A bigger issue to worry about, when coming to deployment is in configuration and getting it right, especially if most assemblies need their own configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With