Online guide to naming software objects? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionIs there a resource that defines and gives guidance to naming objects in software? For instance, when to call something a service vs a handler? When to include nouns or verbs in the name.
I'm looking for something definitive to settle arguments and provide guidelines for my team.
The most important thing about naming, is that all the team do it in the same way. That way you'll understand what an object does from its name, and you'll be able to find objects if you can guess what name they should have. Check this link about Why are good names useful?
Expect no silver bullet. The below two are helpful though and in the order mentioned
- Ubiquitous language.
- Ottinger's Rules for Variable and Class naming
The classical book on Design Patterns from the GoF is quite useful for this:
- It gives design-related naming conventions (which is one of the largest benefits of patterns),
- but also lists a lot of other good concepts, names and definitions (e.g. framework vs. toolkit).
- Since it's a classic, it does set a standard (naming convention) that is either understood or can be looked up.
精彩评论