开发者

Online guide to naming software objects? [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_如何学JAVA

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 question

Is 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

  1. Ubiquitous language.
  2. 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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜