Code structure and namespace best practinces
In a team development environment, it is important to have a best practice guideline. Firstly to avoid confusion for the beginners in the group, secondly to stop people arguing about matters based on their personal opinion.
Today, my colleage and I had a discussion about defining namespace contents, and I decided to search the web to find the answer in Microsoft recommended best practices. The best document which I got is .NET Framework Developer’s Guide, Guidelines for Names,and I could not find the answer of following questions:
- Should software architecture tiers match separate name spaces? example: Does CompanyName.ProductName.UI contain all the codes that running in the UI layer, or it contain only UI controls?
- Where should Exception Handling class be located? in Business namespace or UI or a new namespace such as CompanyName.ProductName.ExceptionHandling?