Attribute
About
attributes are metadata key pair values that are used:
Type
There is 3 kinds of attributes:
-
literal: literal value retrieved from a
system (Example: creation date, …)
computed: value derived through computation (Example:
count, digest, …)
Value
The value of an attribute may be:
Key Casing
Attribute names are case independent meaning that all these names are equivalent
UserCount / userCount - Camel Case
user_count / USER_COUNT - Snake Case
user-count / USER-COUNT - Kebab/Hyphen Case
But the following are not:
dataset and dataSet
uSerCount and userCount
Why ? We parse the attribute name into words using as separators:
Therefore:
dataset is 1 word: dataset
dataSet'is 2 words: data and set
userCount is 2 words: user and count
uSerCount is 3 words: u, ser and count
Casing output
Casing is a matter of:
visual taste
convention
specification and
target system (ie SQL does not allow a
- minus in a name if not quoted)
We try to follow the following conventions when printing or serializing:
-
-
lowercase is the standard state on a keyboard (one key press won, is one key press less)
and we don't like shouting
Yaml file: kebab-case (ie hyphen)