What names do you find yourself prepending/appendi

2019-01-29 19:30发布

Which nouns do you find yourself putting regularly at the end of your classes?

For example, I have a habit of sticking Info onto classes that pass information around but don't do a great deal:

  • ImportInfo
  • SiteInfo

Or for Coordinating classes:

  • UserManager
  • SecurityManager

I end up using Builder quite often for string related classes, even if it barely does any building:

  • TemplateBuilder
  • HtmlBuilder

And of course the timeless Helper/Utility class:

  • PhraseHelper
  • NumberUtility
  • FileHelper

Have you got any good, by which I mean concise and descriptive, nouns or words you regularly use to denote the class' main role?

This question is aimed at the .NET world, but can extend to Java, C++, Python and so on.

14条回答
Lonely孤独者°
2楼-- · 2019-01-29 20:01

why of course...

Base

works both sides.

;-)

查看更多
迷人小祖宗
3楼-- · 2019-01-29 20:04

If my class is specifically doing calculations, I will prepend Calc

Examples:

  • TaxCalc
  • TipCalc
  • DateCalc
查看更多
登录 后发表回答