Selecting objects -- names
Str#38. "Use the Domain Vocabulary" Strategy
- use the domain vocabulary.
- encourage domain experts to eliminate names of things
that aren't their own.
- don't put words in your domain expert's mouth.
- don't change the vocabulary unless the domain expert
feels the need to do so.
- don't change the domain vocabulary--unless your domain
experts choose to change their own vocabulary.
Str#39. The "Domain Terms and Add-Ons" Strategy
- Use a domain name in the problem domain component.
- Use the same name, with a suffix, in the other
components.
- Examples: customer, customer window, customer DM;
altimeter, altimeter indicator, altimeter SI.
Str#40. "Always Look for a Better Class Name" Strategy
objects
- Look for a better class name.
-
- Consider synonyms.
- Consider a more general name, using "is a kind
of."
- Consider metaphors (corresponding objects) within
analogous systems (a system that has an analogous
purpose).
Str#41. "Consistent Class Name Format" Strategy
- Use a name that describes an object in a class (usually
that means a singular name).
- If an object is a collection, use a singular domain name;
the plural of its parts; or the part name plus "collection"
or "server."
- In an object model, begin each class name with an
uppercase letter (begin all other names with a lowercase
letter).
Selecting objects
Strategies for building object
models