5.1. Using OOP Naming Conventions

According to OOP naming conventions, verb phrases (like "compute total") and noun phrases (like "season number") are converted to mixed case names (like "computeTotal" and "seasonNumber").

A plural noun phrase denoting an entity type in a conceptual model, like "TV episodes", is converted to a singular mixed case name, like "TvEpisode". A singular noun phrase denoting an attribute is converted to a mixed case name as well, as shown in Figure 5-1. Also an all upper case acronym, like "TV", is converted to mixed case, like "Tv".

Figure 5-1. Converting natural names to OOP names.

Another example is the conversion of the conceptual model class people to the design model class Person shown in Figure 5-2. In rare cases, an overly long name may have to be replaced by a common abbreviation or by an abbreviation that is still readable. In the example of Figure 5-2, the attribute name "social security no." is converted to the abbreviated mixed case name "socSecNo". Generally, when choosing names, it is preferable to avoid unnecessarily long names, however, never at the cost of readability: names must always be self explaining!

Figure 5-2. Replacing the attribute name "social security no." by "socSecNo".