Reputation: 37025
I am try to find a namespace naming-convention for code I release as an individual outside of a company environment.
The Microsoft guidelines only help for code written by companies.
The general rule for naming namespaces is to use the company name followed by the technology name and optionally the feature and design as follows.
CompanyName.TechnologyName[.Feature][.Design]
But what should I do as an individual with no company?
In Java I would use the address of my personal website, but in C# url-like namespaces do not seem to be favoured.
This is a subtly different question to namespace naming conventions, since it is about naming conventions for individuals, not companies.
Upvotes: 2
Views: 2052
Reputation: 329
This is totally subjective, but the format I use is:
<SolutionName>.<ProjectName>.<FolderName>.<SubfolderName>.<SubSubFolderName>.<etc>
For me, at least I find that my namespacing closely follows my folder structure.
Here are a few examples:
namespace Project.Models.DTO
namespace Project.Domain.Services.Implementations
namespace Project.Controllers
Upvotes: 2
Reputation: 2629
IMHO,If you release it as individual I think better name it like your project/program name, let's imagine that you writing a library with code name "SuperLib" : SuperLib.SuperFeature.SuperDesign
.
Upvotes: 5