CFU's Technical Blog
Home
Archives
Contact
Syndication
Login
News
Blogs I read from kiwis...
Alex Henderson
Alex James
Andrew Peters
Ivan Towlson
Jeremy Boyd
Keith Nicholas
Rod Drury
Blogs I read...
Ayende
Bill Wagner
Brad Abrams
Chris Smith
Code Better
devlicio
Don Box
Dustin Campbell
Frans Bouma
Infinitiesloop
Jeff Atwood
Joe Duffy
Matt Berseth
Rob Conery
Roy Osherove
Scott Hanselman
ScottGu
Tess
Udi Dahan
Post Categories
Yelp
business tactics
io13
jobs
skills
career
development environment
back-end services
diet
health
thinking
webstorm
angular
git
angular-cli
webpack
rxjs
readline
nodejs
Article Categories
BizTalk 2006 R2
SAP
WCF
Archives
April 2017 (1)
March 2017 (3)
October 2016 (1)
August 2016 (1)
November 2008 (3)
October 2008 (2)
September 2008 (5)
February 2007 (3)
Blog Stats
Posts - 19
Stories - 0
Comments - 242
Trackbacks - 3
<< Castle ActiveRecord with multiple databases
|
Home
|
Interesting books >>
How many projects should be in a Visual Studio solution?
Jeremy D. Miller
, kicked off a good discussion on how many projects should be in a Visual studio solution with his latest post
Separate Assemblies != Loose Coupling
.
There are also a few more good posts on same topic:
·
Chad Myer
’s
Project Anti-Pattern: Many projects in a Visual Studio solution
·
Scott Hanselman
’s
Assembly Fiefdom: What’s the right number of assemblies / libraries?
·
Ayende
’s
The two project solution
·
Jacob Lewallen
’s
Projects in Visual Studio
I completely agree with Jeremy that we should keep number of assemblies minimum and do not separate until it is 100% necessary. Until not a long ago, I actually tended to have many projects in my solution. I think I was largely influenced by .NET Petshop 4.0 which I used for a reference project a few years ago. If you want to know what its project structure looks like. Here is it:
So, you can see, for such small application, there are 22 projects and a few of them just contain only one interface file. I would say this is a ridiculous overkill today, but to be honest, I kind of liked it a few years ago. It made me feel it was well designed/
structured/separated, and I can proudly tell my friends that I am working on a huge enterprise system which has
dozens of projects.
After worked with a couple of systems having a lot of projects, I have completely changed my mind. One system I worked with, it has 3 Visual Studio solutions for server, client and some sort of infrastructure level stuff. The sever solution has more than 80 projects, client has around 50 and infrastructure has more than 20. It wasn't me who created so many projects in the first place. I said I liked many projects, but I wouldn't go that far. Having so many projects slows down everything, if I accidentally kick off a “Rebuild”, I would have to go and get myself a cup of tea, have a chat with every colleague in the office, and come back. The time wasted, actually isn’t the biggest problem, more important problem is, developers get frustrated with it, and frustrated developers don’t enjoy working on it, they will not try to recompile immediately after they make a change, they will not do enough tests, they will not check in quickly. For example, if a developer is to add a new feature into the system, he will only rebuild the system and test it after he thinks he has completed the task, instead of breaking down the task into a number of smaller ones, and targeting one at the time.
Another important problem is, the project structure should provide some sort of high level overview of the system, i.e. how many components / layers in the system, how do they communicate to each other. Try to get a good picture of a system from a hundred projects is like to figure out how a car works from its nuts and bolts.
Another system I worked with has about 60 projects. Not as many as the first one, but it has more complicated dependencies among the projects. I couldn’t even rebuild whole solution from Visual Studio, because there is some wired circular reference, and of course I couldn’t run from Visual Studio too. What I had to do is to build the individual project I have made changes, copy all the assemblies to a particular location and run it from there, if I need debug through, I had to attach to the process from Visual Studio. So if anyone thinks separated assemblies enforce separation of concerns or decoupling, I could tell you, no, it won’t help you do that.
So, how many projects I will have in a Visual Studio solution? I think for a small application, something around 5 should be enough. For a more complicated system, 10 would be still reasonable. 20 projects probably is the maximum for both a developer and Visual Studio to manage effectively and efficiently, so, I would be very carful and reluctant to go over 20.
Share This Post:
Short Url:
http://wblo.gs/WgG
Print
| posted on Friday, October 3, 2008 9:22 PM
Feedback
#
re: How many projects should be in a Visual Studio solution?
Left by
benchfolks
at 9/19/2017 12:54 AM
This is a nice blog, Nice information about visual studio. We always prefer visual studio for website development and software development. for more information, you may visit here :
BENCHFOLKS
#
re: How many projects should be in a Visual Studio solution?
Left by
Victor
at 12/8/2017 8:37 AM
Amazing blog and nice information shared.
Funny Wi-Fi Names
#
re: How many projects should be in a Visual Studio solution?
Left by
Roter
at 5/2/2018 10:31 PM
Amzing blogspot thanks for sharing such nice info
Funny WiFi Names
#
re: How many projects should be in a Visual Studio solution?
Left by
David
at 5/28/2018 1:04 AM
Nice post, Thanks a lot of for share the informative and useful blog.
Best Funny Wifi Names
Your comment:
T
itle:
N
ame:
E
mail:
Not Displayed
C
omment:
Verification: