Naming Guidelines for Parts and Their Features

Because the names of classes come from a flat name-space, developers of parts must ensure that their class names are unlikely to duplicate the class names used by other developers. Using a prefix on your class names is a good way to reduce the chances of duplicating a class name. All IBM class names in the global name space begin with the letter "I" for IBM.

A part feature is an element of a part's interface. It is used as a collective term for a part action, attribute, or event.

If you follow these simple conventions in choosing your feature names, it is easier for users of your parts to recognize the function of a feature:

Note: Do not use feature names that start with avl or vb. These are reserved for use by VisualAge.

The main place that users see your action, attribute, and event names is on the Connect menu of the Composition Editor. Because features are shown on this pop-up menu in alphabetical order, the phrasing you use for a feature name is often the only way to distinguish between actions, attributes, and events.

It is important to choose unique names for your new actions, attributes, or events. This prevents you from unintentionally overriding an inherited part feature. If you intend to replace an existing part feature that your part inherits, then your new name must be the same as the name of the part feature you are replacing. The scope within which your feature name must be unique is your part class and all its base classes in the class hierarchy.


Related concepts
About Implementing Nonvisual Parts
About Implementing Custom Visual Parts