My team is trying to decide how to best organize/structure our TFS directory. One proposed solution is to create a directory structure that will dictate the namespaces for our c# projects. For instance, if the tfs directory structure for a specific project was TFS\MyApp\Common, then any C# objects in this directory would be under a namespace called TFS.MyApp.Common
Is coupling the TFS directory structure to our solution namespaces a good idea? Could that be hard to maintain after many changes are made inside of projects and solutions? Does anybody do this where you work today?
-
1The Java language effectively requires that your directory structure mirrors your namespace/package structure. So, yes there are loads of people doing stuff like that.Bart van Ingen Schenau– Bart van Ingen Schenau2015年10月08日 06:20:41 +00:00Commented Oct 8, 2015 at 6:20
1 Answer 1
I would not put TFS in your namespaces - it seems redundant and unnecessary.
Typically you'd use namespaces to organize class libraries by related function. So if you have an API layer for project A, you'd have A.API. You might also have A.UI.
Those are fine, and the suggestion you made looks good, just don't include the TFS part.
Explore related questions
See similar questions with these tags.