Rules and Standards

CAA V5 Java Naming Rules

Standard names for public CAA V5 Java entities
Technical Article

Abstract

As CAA V5 introduces a number of different programming entities, naming conventions have been developed in order to avoid name collisions inside and outside the CAA environment, and to make things clearer for its developers. This article describes these naming conventions for Java entities.


General Principles

The following general principles have been established when choosing rules for CAA V5 names:

  1. Brand-based prefixes. A prefix [1] is used for most entities that may collide with other entities of the same nature, but developed outside the Dassault Systèmes (DS) Group. It denotes the DS origin of the entity. Other entity suppliers, and in particular CAA partners, are expected not to begin their names with DS reserved prefixes. Prefixes are based on DS brandnames, because of their perennity : V5 is the default prefix for all DS cross-brands resources (CAT for CATIA, ENOV for ENOVIA, DELM for DELMIA)
  2. Aliases for frameworks. All frameworks are assigned a short 3-letter alias with first letter capitalized (e.g., V5Dialog-> Dlg) [2]. This alias is used as a shortcut for the framework name for building other framework related names. It is referred to as <FWAlias> in the remaining of this document. Framework aliases will be defined in the framework's identity card. Trigrams are typically used to name entities that are associated to frameworks (eg modules). Since all modules from all frameworks are merged at runtime into common repositories (e.g., RuntimeView), trigrams provides a mean of avoiding conflicts. For a given framework FW, the same trigram applies to the framework and to its associated FW.tst and FW.edu frameworks.
  3. English. Names are based on english/american words.

[Top

Global Rule

Entity Name Entity Nature Naming Rule Metrics
1-All All V5<EntityName>
  • Name length should not exceed 27 characters
  • Names are composed using [A-Z][a-z][0-9] symbol range. Other symbols (such as \, -, /, ; _and the like) are forbidden
Nb of deviations / Nb of entities

[Top]

Entities Associated with a Directory

The entity and the directory that contain it must have the same name.

Note: V5 can be replaced by other valid prefixes (such as CAA, CAT, ENOV, and DELM) in the patterns below.

Entity Name Entity Nature Directory Naming Rule Notes Metrics
2-Code Framework Physical grouping of classes, interfaces, macros, functions dedicated to some specific task or domain. V5<FWName> Nb of deviations / Nb of entities
3-Test Framework Physical grouping of classes, interfaces, macros, functions dedicated to some specific task or domain. V5<FWName>.tst V5<FWName>.tst contain test material for code contained in the code FW. Nb of deviations / Nb of entities
4-CAA Frameworks Special kinds of frameworks that contain sample code and documentation that is intended for delivery to final customer as CAA products CAA<FWName>.edu
CAA<FWName>Doc.edu
CAA<FWName>.tst
CAA<FWName>.edu contains only sample CAA Code (*.m modules).
CAA<FWName>Doc.edu contains only CAA Documentation (*.doc modules).
CAA<FWName>.tst contain test material for code contained in sample code FW.
Nb of deviations / Nb of entities
5-Code Module Physical grouping of interrelated objects within a framework, which defines the unit of code loading into main memory. V5<FWAlias><ModuleName>.mj Modules should retain their FW name to avoid collisions when they are all mixed together in a single directory of the run time view. Nb of deviations / Nb of entities
6-Code Module in test FW Physical grouping of interrelated objects within a framework, which defines the unit of code loading into main memory. Used for testing the code delivered by a FW V5<FWAlias><Tst><ModuleName>.mj Additional <Tst> allows same FW alias to be used between FW and associated FW.tst, without risk of duplicate names. Nb of deviations / Nb of entities
7-Code Module in education FW Same as code module, but within a CAA code framework. CAA<FWAlias><Edu><ModuleName>.mj Additional <Edu> allows the same FW alias to be used between FW and the associated FW.edu, without risk of duplicate names. Nb of deviations / Nb of entities
8-Code main module Utility code module, unique to a FW, that act as the union of all the FW's modules when link editing other FWs modules. V5<FWName>.mj Clients wishing to link edit with any module of the target FW do not have to know about each module name while retaining the benefits of FW modularity. Nb of deviations / Nb of entities
9-Doc Module in education FW Logical grouping of related documents about a CAA framework. CAA<FWAlias>TechArticles.doc
CAA<FWAlias>UseCases.doc
CAA<FWAlias>QuickRefs.doc
CAA<FWAlias>Base.doc
These modules are standard for those Fw.
TechArticles contain articles not linked to a particular piece of delivered code.
UseCases support some delivered code (in a CAAxxx.edu associated FW)
QuickRefs are for special articles that are presented as "catalogs" of resources for the Fw
Base is for the rest of articles, mainly navigation articles.
Nb of deviations / Nb of entities
10-Java package Physical grouping of Java classes and interfaces in a naming hierarchical structure. com.dassault_systemes.<fwkname>. <modulename> [.<pack1>... <packn>] <fwkname> is the name of the framework in lowercase letters.
<modulename> is the name of the module in lowercase letters.
<packi> is a short name in lowercase letters like the java packages: event, image, io, math security, text, util, server
Nb of deviations / Nb of entities

[Top]

Entities Associated with a File

One of the main purposes of the naming rules is to insure the uniqueness of the files. As regards the Java code files, using the brand-based prefix is useless since the classes belong to a package beginning with a name representing the company. e.g.: com.dassault_systemes for Dassault Systemes' code.

Entity Name Entity Nature Entity and File Naming Rule Notes Metrics
11-Class imports Standard Java class import <package.explicit class name> No import has to be done using wild-cards. Nb of deviations / Nb of entities
12-Simple Class Standard Java class <ClassName>.java One class definition per file.
The name should be a descriptive noun or noun phrase, in mixed case with the first letter of each word capitalized.
Nb of deviations / Nb of entities
13-Simple Interface Standard Java interface I<InterfaceName>.java One interface definition per file.
The name should be in mixed case with the first letter of each word capitalized.
To recognize an interface from a class, prefix it by I (e.g., ICATlet)
Nb of deviations / Nb of entities
14-Event Class Java class representing an event <SourceObject>Event.java e.g., CSOEvent.java Nb of deviations / Nb of entities
15-Listener Interface Java interface that event listeners implement <SourceObject>Listener.java e.g., CSOListener.java Nb of deviations / Nb of entities
16-Adapter Class Java class representing an adapter for an event listener interface <SourceObject>Adapter.java e.g., CSOAdapter.java Nb of deviations / Nb of entities
17-Exception Class Java class representing an exception <Name>Exception.java e.g., SettingException.java Nb of deviations / Nb of entities
18-BeanInfo Class Java class deriving from SimpleBeanInfo and describing the properties of an entity. <EntityName>BeanInfo.java e.g., CSOBeanInfo.java, PerfCATletBeanInfo.java Nb of deviations / Nb of entities
19-CATlet List File File containing the list and the position of the CATlets in the Portal V5<FWAlias><Name>CATletList.xml Nb of deviations / Nb of entities
20-Workshop File File containing the list and the position of the commands inside a CATlet V5<FWAlias><Name>Workshop.xml Nb of deviations / Nb of entities
21-MIME Type File File defining MIME types in the Portal registry. V5<FWAlias><Name>MIMEtypes.xml Nb of deviations / Nb of entities
22-Project File Xml file which manages bookmarks in the Webtop configuration. V5<FWAlias><Name>Project.xml Nb of deviations / Nb of entities
23-NLS Resources File containing text used as resources by the code, and subject to translations in foreign languages Nb of deviations / Nb of entities
24-Resource Catalog File containing resources for the code such as keyword values, locations of classes or images. V5<FWAlias><Name>_<lang>.properties
where <lang> = en , fr, de, or ja.
Nb of deviations / Nb of entities
25-Documentation File html file containing installation or help documentation V5<FWAlias><Name>[_<lang>].htm[l]
where <lang> = en , fr, de, or ja
Nb of deviations / Nb of entities
26-Icon files File containing the graphical definition of an icon. File: V5<FWAlias><IconName>.<ext> <ext> refers to the standard file extension corresponding to the graphical format used (e.g. .bmp) . Nb of deviations / Nb of entities
27-Setting File File containing configuration information to save between two sessions File: V5<FWAlias><Name>.CATSettings Nb of deviations / Nb of entities

[Top]


References

[1] CAA V5 Naming Rules
[2] Trigrams for Frameworks
[3] CAA V5 Java Coding Rules
[Top]

History

Version: 1.0 [Sep 2000] Document created
Version: 1.1 [Oct 2000] Metrics added; import convention rule added.
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.