Naming conventions - SchwarzIT/sap-usi-logging-api GitHub Wiki

The product specific abbreviation for the API is "BAL" (Basis application log).
It has to be used in every object name to indicate that the object belongs to the API.

The names of all development objects should follow the pattern "/USI/BAL_<meaningful name>".
Exceptions from this rule are listed in the table below.

Object Type Naming convention Example
Exception class /USI/CX_BAL_<meaningful name> /USI/CX_BAL_DB_ERROR
Class /USI/CL_BAL_<meaningful name> /USI/CL_BAL_LOGGER
Interface /USI/IF_BAL_<meaningful name> /USI/IF_BAL_LOGGER
Lock Object /USI/E_BAL_<meaningful name> /USI/E_BAL_LOG

Prefixes for classnames

The API has an internal naming convention for certain class types that shall add a little more structure.

When enhancing the API please ensure, that you stick to this convention. This is especially important, if the classes are used externally like e.g. the data containers. A unified naming convention will make it a lot easier for the users to find the classes, they are looking for.

Class Type Package External reuse Prefix Description
Data containers /USI/BAL_DATA_CONTAINERS Yes (all) /USI/CL_BAL_DC_* Detail data for log messages
Text containers /USI/BAL_TEXT_CONTAINERS Yes (all) /USI/CL_BAL_TC_* Labels for data containers
Enumeration classes /USI/BAL_ENUM Yes (some) /USI/CL_BAL_ENUM_* Constants used by the API
Customizing-DAO-Classes /USI/BAL_CUST_DAO No /USI/CL_BAL_CD_* Physical access to cust. tables
Customizing-Evaluation-Classes /USI/BAL_CUST_EVALUATION No /USI/CL_BAL_CE_* Find most important cust. entry
Exception mapper classes /USI/BAL_EXCEPTION_MAPPERS No /USI/CL_BAL_EM_* Extract exception data while logging
Global test classes /USI/BAL_UNIT_TEST No /USI/CL_BAL_AUNIT_* Helper classes for unit tests