Naming conventions and guidelines Naming conventions and guidelines To assist all members of your team in understanding the purpose of individual items in the model, it is a good idea to define naming conventions. These conventions help team members to read the diagram quickly and remember the model element names easily. Note: Remember that usually the names used in the Rational Rhapsody models are going to be automatically written into the generated code. Therefore, the names should be simple and clearly label all of the elements, and they should not use any special characters. Guidelines for naming model elements The names of the model elements should follow these guidelines:
Љ Class names begin with an upper case letter, such as System . Љ Operations and attributes begin with lower case letters, such as restartSystem . Љ Upper case letters separate concatenated words, such as checkStatus . Љ The same name should not be used for different elements in the model because it will cause code generation problems. For example, you should not have a class, an interface, and a package with the same name of Dishwasher . Љ Note the following about special characters: – Do not include special characters in an element’s name if the element is used for code generation. – You can use special characters in the labels for model elements. See Descriptive labels for elements .
– The following elements are the only ones for which you can include special characters: Dependencies, Stereotypes, Flows, Links, Configurations, Table layouts, Table views, Matrix layouts, Matrix views, Requirements, Actors, Use Cases, and all diagrams. – You can use the General::Model::NamesRegExp property to control what special characters are allowed. For detailed information on a property, see the definition displayed in the Properties tab of the Features window. For information about using properties in your project, see Properties .
– While you can use spaces (but not special characters) in the names for actors, it is not typical because the spaces might cause problems during code generation. Rational Rhapsody 251