...
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 |
---|---|---|---|---|
Agreements and Promotions Header |
| AP_ | AP_Header | |
Agreements and Promotions Line Item |
| AP_ | AP_LineItem | |
Calculation Flow |
| CF_ | CF_RebateRecords | |
Calculated Field Set | null (default) | CFS_ | CFS_ProductEnrichment | |
|
|
| ||
Configurator | null (default) | Configurator | SampleConfigurator | |
Data Load |
| DL_ | DL_ProductCost | |
Distributed Data Load |
| DLD_ | DLD_RebateAllocation | |
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 | |
Rebates Agreements Header |
| RM_ | RM_Header | |
Rebate Agreements Line Item |
| RM_ | RM_Rebate | |
Groovy Library |
| Lib | SharedLib MonitoringLib |
Note: In the long term, we would like the logics of the same Formula Nature to be stored in a subfolder. Default Formula Nature should be deprecated, so there will be no need for prefixes.
...
Element names should also be unique within the entire project – across all logics and classes from java.lang or java.util packages. This is to enable the auto-completion and unit testing with TDD4C. Examples of too common names causing issues:
Library
Lib
Utils
Filter
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. |
...
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
| ||
s | Elements that represent a collection. | PX_Records |
Element Labels
Will probably get deprecated. Use the label translations instead.
...