Table of Contents | ||
---|---|---|
|
...
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.
Logic Names
Logic names should be written in CamelCase.
Examples:
- DefaultLogic
- Pricelist
- Main
- DefaultQuoteLogic
However, there are a few exceptions; the following logic types should be written with the following prefixes:
Logic type | Formula Nature | Prefix | Suffix | Example |
---|---|---|---|---|
Calculation Flow | calculationFlow | CF_ | CF_DailyCalculation | |
Calculated Field Set | null /(default) | CFS_ | CFS_ProductEnrichment | |
Dataload | "paDataLoad" | DL_ | DL_LoadFromPX | |
Groovy Library |
| Lib | SharedLib |
Element Names
Whenever an identifier is required (uniqueName, name, etc.), it is recommended to use identifiers in a ClassicalCamelCaseFormAsYouKnowItFromJava, e.g. SalesPrice. If there is a abbreviation used in the name, it is naturally useful to separate it with an underscore character "_", for example, ABC_Class (instead of ABCClass).
...
The suffixes can be combined.
Logic Names
The general rule is to make the first letter uppercase.
Example: DefaultLogic, Pricelist, Main, DefaultQuoteLogic
For the following logic types, there is a recommended prefix/suffix:
...
calculationFlow
...
paDataLoad
...
library
...
Element Names
The general rule is to make the first letter uppercase. The reason is that the element is implemented as a Groovy class and therefore referring to the element's methods from Groovy is done as SomeElement.callSomeMethod(). For this syntax the auto-completion will work in Pricefx Studio, since IDEA will understand it as a static call of a method (even though it is not a static call but an instance call on a binded object). Another reason for the first capital letter is to have the possibility to refer to previous elements:
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
...