Skip to content

Commit d79eaf8

Browse files
authored
Clarify terminology for "name" attribute in best practices (#332)
1 parent 40478bd commit d79eaf8

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

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

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ SPDX-License-Identifier: MPL-2.0
1717

1818
The following best practices, while not mandatory, are highly recommended for optimal performance and to mitigate potential issues, especially when working with Aspect Models at scale.
1919

20-
[[the-name-attribute]]
21-
== The `name` attribute
20+
[[model-element-names]]
21+
== Model element names
2222

23-
The `name` attribute is mandatory for all model elements.
23+
This section refers to model element names as described in
24+
xref:ROOT:namespaces.adoc#aspect-model-element-identifiers-definition[Aspect Model Element
25+
Identifiers Definition], i.e., the part of a model element's identifier after the `\#` sign of a
26+
model element URN or after the `:` in the CURIE syntax, respectively.
2427

2528
Use camel-case capitalization, as detailed in the xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
2629

@@ -42,7 +45,8 @@ In addition to that, there are also best practices for:
4245
[[camel-case-for-acronyms]]
4346
=== Camel case for acronyms
4447

45-
For every part of a `name`, also for acronyms, strictly apply camel-case capitalization as detailed in the xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
48+
For every part of a model element name, also for acronyms, strictly apply camel-case capitalization
49+
as detailed in the xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
4650

4751
For example:
4852

@@ -57,12 +61,12 @@ For example:
5761
|`documentUrl`
5862
|===
5963

60-
Create `name` attributes where each capital letter can be trusted to trigger the start of a new name part.
64+
Create model element names where each capital letter can be trusted to trigger the start of a new name part.
6165

6266
That way, for example, automated case conversion will produce meaningful names (e.g., when generating code based on an Aspect Model):
6367

6468
|===
65-
|SAMM `name` |Resulting name in generated code (automated case conversion)
69+
|Model element name |Resulting name in generated code (automated case conversion)
6670

6771
|{nok-small} `documentURL`
6872
|`DOCUMENT_U_R_L` {nok-small}
@@ -116,7 +120,7 @@ Complete identifier of such a Property: +
116120
`urn:samm:foo.myapplication:1.0.0#count`
117121
|===
118122

119-
NOTE: The complete identifier of a Property is the versioned namespace combined with the element's `name`, for example, `urn:samm:foo.myapplication:1.0.0#count`.
123+
NOTE: The complete identifier of a Property is the versioned namespace combined with the element's name, for example, `urn:samm:foo.myapplication:1.0.0#count`.
120124
So, the `foo` context (namespace) is already part of `count`​'s identifier.
121125

122126
[[no-redundant-suffix]]
@@ -160,7 +164,7 @@ Regarding meaningfulness, see also the details given for the `description` attri
160164
[[add-payload-names-for-properties]]
161165
=== Payload names for Properties
162166

163-
An expressive Property `name` can be long.
167+
An expressive Property name can be long.
164168

165169
If you consider a Property's name too long for the runtime payload, xref:ROOT:modeling-guidelines.adoc#payload-names[add a payload name].
166170

@@ -215,7 +219,7 @@ For optimal results, consider the following best practices:
215219

216220
In addition to that, there are also best practices for:
217221

218-
* <<the-name-attribute>>
222+
* <<model-element-names>>
219223
* <<the-description-attribute>>
220224

221225
[[precise-and-understandable]]
@@ -236,17 +240,17 @@ People might encounter the Preferred Name, for example:
236240
[[separate-words]]
237241
=== Separate words
238242

239-
Should you copy and paste an element's `name` to use it as the `preferredName`, adapt it accordingly.
243+
Should you copy and paste an element's name to use it as the `preferredName`, adapt it accordingly.
240244

241-
For example, if the `name` consists of more than one word, written in camel case, separate it into the respective words.
245+
For example, if the name consists of more than one word, written in camel case, separate it into the respective words.
242246

243-
.Examples of Preferred Names derived from the `name` attributes of the model elements
247+
.Examples of Preferred Names derived from the model element names of the model elements
244248
[source,turtle,subs="attributes+,+quotes"]
245249
----
246250
:plantId a samm:Property ;
247251
samm:preferredName "plant ID"@en ;
248252
249-
:machineTmperature a samm:Property ;
253+
:machineTemperature a samm:Property ;
250254
samm:preferredName "machine temperature"@en ;
251255
252256
:euTaxonomyDisclosureStatement a samm:Property ;
@@ -380,7 +384,7 @@ For optimal results, consider the following best practices:
380384

381385
In addition to that, there are also best practices for:
382386

383-
* <<the-name-attribute>>
387+
* <<model-element-names>>
384388
* <<the-preferredname-attribute>>
385389

386390
[[capitalization-start-uppercase]]
@@ -443,15 +447,15 @@ It can consist of only a sentence fragment, or it may be longer—but do not jus
443447
|Set of products sharing similar features.
444448
|===
445449

446-
Regarding meaningfulness, see also the details given for the `name` attribute at <<meaningful-names>>.
450+
Regarding meaningfulness, see also the details given for the model element name at <<meaningful-names>>.
447451

448452
[[abbreviations-in-descriptions]]
449453
=== Unmistakable abbreviations
450454

451455
Use abbreviations sparingly.
452456

453457
Only use very common standard abbreviations; ensure they are not misleading.
454-
See also the details provided for the `name` attribute: <<unmistakable-abbreviations>>.
458+
See also the details provided for the model element name: <<unmistakable-abbreviations>>.
455459

456460
It is acceptable to use editorial abbreviations such as `e.g.` ("for example") or `i.e.` ("that is") or `etc.` ("and so forth").
457461

0 commit comments

Comments
 (0)