Skip to content

Commit 4d95ea1

Browse files
committed
Add another example plus explanation for strict camel case naming
1 parent f6278c9 commit 4d95ea1

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

documentation/modules/appendix/pages/best-practices.adoc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,24 @@ In addition to that, there are also best practices for <<describing-elements>>.
4040
[[apply-camel-case-to-acronyms]]
4141
=== Apply camel case to acronyms
4242

43-
Be strict about the camel case xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules]. Also apply it to any acronyms that may be present in your model element names.
43+
Be strict about the camel case xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
44+
Also apply it to any acronyms that may be present in your model element names.
4445

4546
|===
4647
|{nok-small} DON'T |{ok-small} DO
4748

48-
|`mainECU` +
49-
`MainECU`
50-
|`mainEcu` +
51-
`MainEcu`
52-
|`plantID` +
53-
`PlantID`
54-
|`plantId` +
55-
`PlantId`
49+
|`mainECU`
50+
|`mainEcu`
51+
|`plantID`
52+
|`plantId`
53+
|`documentURL`
54+
|`documentUrl`
5655
|===
5756

58-
NOTE: Enforcing a strict camel case naming rule, also for acronyms, mitigates issues with further tools parsing Aspect Models. That way, a capital letter can be trusted to always trigger the start of a new name part.
57+
Enforcing a strict camel case naming rule, also for acronyms, mitigates issues with further tools parsing Aspect Models.
58+
That way, a capital letter can be trusted to always trigger the start of a new name part.
59+
60+
For example, it allows automated case-conversion, e.g., turning `documentUrl` into `DOCUMENT_URL`, when generating code from an Aspect Model. If, however, you kept the acronym in upper case (`documentURL`) you would end up with `DOCUMENT_U_R_L`.
5961

6062
[[choose-abbreviations-carefully]]
6163
=== Choose abbreviations carefully

0 commit comments

Comments
 (0)