You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/domain-modeling.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,8 +88,7 @@ The more we succeeded in capturing intent over imperative implementations, the m
88
88
89
89
We use CDS as our ubiquitous modelling language, with CDS Aspects giving us the means to separate core domain aspects from generic aspects. CDS's human-readable nature fosters collaboration of developers and domain experts.
90
90
91
-
As CDS models are used to fuel generic providers — the database as well as application services — we ensure the models are applied in the implementation. And as coding is minimized we can more easily refine and revise our models, without having to refactor large boilerplate code based.
92
-
91
+
As CDS models are used to fuel generic providers — the database as well as application services — we ensure the models are applied in the implementation. And as coding is minimized we can more easily refine and revise our models, without having to refactor large boilerplate codebases.
93
92
94
93
95
94
@@ -230,9 +229,9 @@ Note:
230
229
-**Namespaces are optional** — use namespaces if your models might be reused in other projects; otherwise, you can go without namespaces.
231
230
- The **reverse domain name** approach works well for choosing namespaces.
232
231
233
-
::: warning
232
+
::: warning Avoid names that could change
234
233
235
-
Avoid short-lived ingredients in namespaces, or names in general, such as your current organization's name, or project code names.
234
+
Don't use short-lived ingredients in namespaces, or names in general, such as your current organization's name, or project code names.
236
235
237
236
:::
238
237
@@ -341,7 +340,7 @@ It is an unfortunate anti pattern to validate UUIDs, such as for compliance to [
341
340
342
341
On the same note, converting UUID values obtained as strings from the database into binary representations such as `java.lang.UUID`, only to render them back to strings in responses to HTTP requests, is useless overhead.
343
342
344
-
::: warning
343
+
::: warning In summary:
345
344
346
345
* Avoid unnecessary assumptions, for example, about uppercase or lowercase
347
346
* Avoid useless conversions, for example, from strings to binary and back
[Learn more about the usage of aspects in the _Aspect-oriented Modeling_ section.](../cds/aspects).{ .learn-more}
616
615
617
-
::: tip
616
+
::: tip Consumers always see effective models
618
617
619
-
Consumers always see the merged effective models, with the separation into aspects fully transparent to them.
618
+
The separation into aspects is fully transparent to consumers.
620
619
621
620
:::
622
621
@@ -756,7 +755,7 @@ entity Books.texts {
756
755
757
756
Essentially, this is also what CAP generates behind the scenes, plus many more things to ease working with localized data and serving it out of the box.
758
757
759
-
::: tip
758
+
::: tip`localized` keeps models comprehensible
760
759
By generating `.texts` entities and associations behind the scenes, CAP's **out-of-the-box support** for `localized` data avoids polluting your models with doubled numbers of entities, and detrimental effects on comprehensibility.
0 commit comments