Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

General Guidance

  • Makes names meaningful and descriptive of the role of the class.
  • Avoid overly long names.
  • Acronyms should be have only the first character upper-cased. MyJdbcUtils vs MyJDBCUtils
  • Collections should be plural nouns or end in "Collection". i.e Devices or DeviceCollection

Interfaces

  • Interface names must begin with "I". The rest of the name should be descriptive of it's responsibility.
  • Single method interfaces can usually be suffixed with "able" such as ICloneable, IPassivatable, etc.

Classes

  • Most class names should be nouns.
  • If implementing a single interface, base the name on that of it's interface.
  • If a class is the only implementation of an interface available in the system, the class can begin with "Default" or end in "Impl".
  • A class which supplies or resolves another entity should be an XxxResolver, XxxProvider or XxxFactory
  • Objects which hold others allowing the retrieval later should be a "Repository" or "Registery"
  • Most other cases should have a noun as it's root where possible, IVehicle, IContentGenerator
  • If a class is involved with another either by servicing or modifying the another or is just intimately involved in some way, including the name of that other as part of the name is encouraged. Examples: RepositoryListener, CustomerDetails, FooRegistry,
  • No labels