I’m not too quite sure about what i should do about a grouped set of classes.
My situation: I have 11 classes that relate only to the class Character.cs, but all of those classes (including Character.cs and CharacterManager.cs) are within the namespace Models.Characters.
Which is the more “proper” or preferred way of naming the classes:
(examples):
CharacterDetails.cs
CharacterSprites
CharacterAppearance
CharacterClientRights
CharacterServerRights
or:
Details.cs
Sprites
Appearance
ClientRights
ServerRights
(They’re all noticed in Models.Characters (so eg. Models.Characters.CharacterDetails, Models.Characters.Appearance)
Thanks in advance.
Personally for me it”depends”. Usually I would prefix everything with the word
Characterto keep things consistant, however if you have everything already under theCharacternamespace the Character prefix could seem redundant.I could easily see going with the shorter convention of
Models.Character.[X]if there never will be another class calledDetails, if there for instance could beUserDetailsthenDetailsandUserDetailscould be confusing when looking back at the code weeks or months from now and I would personally prefer then theCharacterDetailsoption.In the end it is your personal preference, what more accurately describes your domain,
DetailsorCharacterDetails?