Namespaces - How deep is too deep?

Any namespace that follows the logic of your application structure is fine - regardless of the length.

Thanks, that's what I felt. This was just one of those times where I wanted clarification of my thinking. – MrEdmundo Oct 8 '10 at 11:50.

It something smells too long, step back and analyze it. If it passed muster, then I agree completely with @Bozho. Software development is extremely objective and full of exceptions to hard-fast rules.(couldn't resist).

It can be handy to make your folder structure match your namespace structure, but it makes no sense to make a namespace structure match a folder structure. The types and members of the namespace(s) are the things you are making. That is the output of your craft and the thing you should be concerned about.

The files in the folder are a way to help you do so. You may have already structured the folders such that they match a sensible namespace (essentially you "wrote" the namespace structure when you did so), in which case all and good, but you may also have not done so. The namespaces will matter both to the creators of the assembly(s) and the users of it, the folder structure only to the creators.

Ignore depth, ignore folders, look at the spaces created by the names.

We have a namespace seven layers deep, with an eighth symbol on the end for the class. The dropdown in the top-left of Visual Studio 2010 that allows you to choose the class within this file doesn't fit our fully qualified class name, and when you mouse over it, there's no tooltip, so the only way to find the class name is to undock the source view and stretch it across two monitors. I know this is dependent on the total length of the names, and not necessarily the number of nested namespaces, but I'm going to go ahead and define this as "too deep" :).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions