Versions Compared

Key

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

...

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

  • DefaultPriceGrid

  • CustomerPriceList

Preferably, if the logic is tied to a certain object type, it should start with the type code as a prefix:

Logic type

Formula Nature

Prefix

Suffix

Example

Calculation Flow

calculationFlow

CF_


CF_RebateRecords

Calculated Field Set

null (default)

CFS_


CFS_ProductEnrichment

Contracts

CT_

CT_DefaultContractLogic

Data Load

paDataLoad

DL_


DL_ProductCost

Dashboard

null (default)

DB_

DB_Waterfall

Price List

null (default)

PL_

PL_National

Live Price Grid

null (default)

PG_

PG_Computers

Quotes

null (default)

Q_

Q_DefaultQuoteLogic

Groovy Library

library


Lib

SharedLib

MonitoringLib

Note: long term wise we would like the logic of the same Formula Nature be stored in a subfolder. And Default Formula Nature should be deprecated, so there will be no need for prefixes.

Element Names

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

...

Element names should also be unique within the entire project – across all logics. This is to enable the auto-completion and unit testing with TDD4C. Examples of too common names causing issues:

  • Library

  • Product

  • Customer

  • etc.

Info

When running the logic locally, the element classes will belong to the default pages. The JVM requires classes within the same packages to be unique, so this will make the local compilation fail.

...

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 percentagerepresented as fraction, i.e. it should not be multiplied by 100.

s

Elements that represent a collection.

PX_Records

Element Labels

Will probably get deprecated. Use the label translations instead.

Label Translations

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

...