-
Notifications
You must be signed in to change notification settings - Fork 1
Requirements on metamodel keys #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does the dashes-policy as described above makes sense? |
For the actual keys in the M3, I was thinking more along the lines of But I don't get why dashes instead of underscores. A key with underscores is likely immediately Java-friendly, right? |
My line of thought for Java-based names:
If we swapped Java dots with LIonWeb underscores, the mapping becomes ambiguous: Java package name ^1: Dashes in (package) names would be ambiguous with subtract operation if using full qualified names: |
OK, so dashes are in addition to underscores, with the explicit purpose to have an effective equivalence Java FQ-names ⇆ keys? That sounds good. |
So the M3 ids would be like
I'd prefer |
Agreed in meeting on 2023-06-09 |
For reference: The agreed ids and keys are listed in metamodel docs |
Both
NamespacedElement.key
andMetamodel.key
MUST adhere to LIonWeb id format (#31).NamespacedElement.key
MUST be unique within its metamodel.Metamodel.key
SHOULD be globally unique, and MUST be unique within an id-space (#31).For approximate global uniqueness, we SHOULD adopt Java's package naming scheme, based on domain names.
As we don't allow dots (
.
) in ids, we SHOULD use dashes (-
) instead.Dashes are preferable to underscores (
_
) because of better Java compatibility: In Java package names, underscores are allowed, but dashes are not. The same applies to most other programming languages, as they need to separate names from subtract expressions. Thus, we can easily establish similar names for metamodels and packages by substituting dashes with dots.Example: Given domain
subdomain.example.com
, metamodel keys might becom-example-subdomain-myDepartment-group123-entity_model
(with package namecom.example.subdomain.mydepartment.group123.entity_model
) andcom-example-subdomain-great_ultimate_universal_unified_dataModel
(with package namecom.example.subdomain.great_ultimate_universal_unified_datamodel
).The text was updated successfully, but these errors were encountered: