Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Naming conventions make programs more understandable by making them easier to read. In addition to the Java naming conventions, Pricefx has its own set of recommended naming conventions for logics and metadata.

Table of Contents
minLevel1
maxLevel7

Logic Names

Logic names should be written in CamelCase, with the first letter capitalized, for example:

...

However, there are a few exceptions for the following types of logic:

Logic type

Formula Nature

Prefix

Suffix

Example

Calculation Flow

"calculationFlow"

CF_


CF_RebateRecords

Calculated Field Set

null (default)

CFS_


CFS_ProductEnrichment

Dataload

"paDataLoad"

DL_


DL_ProductCost

Dashboard

null (default)

DB_

DB_Waterfall

Groovy Library

"library"


Lib

SharedLib

MonitoringLib

Element Names

Element names should be written in CamelCase, with the first letter capitalized, for example:

...

Across logics and entire projects, some patterns of element behavior tend to emerge. For these elements, here are some suggested naming conventions:

Suffix

For

Example Element Name

Example Label

Example Value

Diff

Elements that represent a difference, i.e. a result of a subtraction

VolumeDiff

Volume ∆

234 litres

Abs

Elements that represent an amount of money, in absolute terms.

MarginAbs

Margin EUR

Margin $

Margin €

34

$23

€34

Pct

Elements that represent a quotient. These elements are typically formatted as percentages.

MarginPct

Margin %

0.45

Note

Despite the naming convention, the value should not be a percentage, i.e. it should not be multiplied by 100.

s

Elements that represent a collection.

PX_Records

Element Labels

Labels should be identical to the element names, but with the words separated by spaces. Some words can be replaced by symbols, for example:

...