SAP CAP Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
qmacro
Developer Advocate
Developer Advocate
1,108

At one level, the CDS family of languages cover definitions, queries and expressions, in the form of CDL, CQL and CXL respectively. Each of these languages have a human-readable form and a machine-readable form. For example, while CDL is the human-readable form of the definition language, CSN is the machine-readable equivalent. Moving one level deeper, the machine-readable forms have different representations. The same information, just expressed, or rather represented, in different formats.

There is a strong parallel here with HTTP resources - logical entities, the "nouns" in the simple view of HTTP being about a limited number of "verbs" (methods) that operate on a near-infinite number of "nouns" (resources). These HTTP resources (such as a purchase order, a weblog, an image) can exist (or be served) in a number of different representations:

  • a purchase order in some schema-constrained XML, or as a PDF
  • a weblog in HTML form, or in RSS (feed) form
  • an image in PNG, JPEG or even ASCII-art form

In each case, it's the same resource just in different representations.

And so it is with the CDS family of languages, notably the machine-readable forms. So for example CSN might internally be represented as a JavaScript object, but if we ask for CSN we can specify whether we want a JSON representation, or a YAML representation.

But there's another related concept in the metaphysics of languages in CAP, and that is how CDS models can be compiled to other languages. For example, the schema in a domain model (defined in CDL) might be compiled to DDL (a subset of SQL). Or a service definition might be compiled to EDMX (for an OData context).

If "Representations" is the term for how the same information can be presented and available in different formats, what is the term, also plural and beginning with "R", for how information can be compiled to and made available as different languages?

This is a question from the June Developer Challenge on CAP Knowledge. And don't forget: always submit your answer as a hash, on its own - read the Taking part section of the intro post for more info. At the end of today, this question will be updated with links to further reading on this topic.

Further info:

31 Comments