dark_perfect
dark_perfect

Reputation: 1478

.NET Naming Convention for Namespaces

I understand basic naming conventions and capitalization conventions in .NET, and have read .NET's naming guidelines here, but there's one thing in particular that I'm unsure over.

My company name is, for example, XYZ Studios. We have created a new system, again for example, called a Large Object Management System and we are calling it LOMS for short.

I want to create a .NET project to contain the entity framework entities which map to the LOMS database. The namespace name will be XYZStudios.LOMS.Entities.

My question is, which of the following is the correct capitilization for the namespace? :

Upvotes: 0

Views: 204

Answers (1)

John Koerner
John Koerner

Reputation: 38079

I would lean towards your second bullet of :

XyzStudio.Loms.Entities 

The points of contention here are LOMS and XYZStudio, so we can disregard talking about the entities portion.

For LOMS being referred to as Loms in the namespace follows the precedence of other acronyms in use in .Net code. Examples:

System.Xml
System.Json
Newtonsoft.Json

For XYZStudio being reffered to as XyzStudio, some precedent exists (and there is probably more):

Sony Computer Entertainment (SCE) is referred to as Sce in their ATF namespace.

namespace Sce.Atf.Atgi

Also, if you look at java guidelines for namespaces, they don't capitalize anything, regardless of being a proper noun or not.

Upvotes: 1

Related Questions