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: packages/concertino/README.md
+38-61Lines changed: 38 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,15 @@
2
2
3
3
Concertino is a lightweight variant of the Concerto metamodel format, optimized for client applications that need to programmatically introspect declarations without taking a dependency on the full Concerto SDK.
4
4
5
+
## Benefits of the Concertino Format
6
+
The Concertino format provides several advantages:
7
+
8
+
- Flatter structure: By denormalizing the inheritance hierarchy, consumers don't need to traverse the hierarchy to understand a definition.
9
+
10
+
- More explicit metadata: Additional metadata makes it clearer how properties should be interpreted.
11
+
12
+
- Ready for consumption: The transformation prepares the data for easier consumption by tools and renderers, without requiring additional processing.
13
+
5
14
## Features
6
15
7
16
-**Fully Resolved Type References**: No ambiguous shortnames
@@ -10,14 +19,10 @@ Concertino is a lightweight variant of the Concerto metamodel format, optimized
10
19
-**Extended Inheritance Chain**: Concepts list their full inheritance chain, not just immediate parent
11
20
-**Scalar Type Denormalization**: For convenience in client applications
12
21
-**Strict Mode By Default**: Namespaces are always versioned.
22
+
-**Support for Partial Models** Allowing client applications to filter models to tailor payloads for their use cases.
23
+
-**Lossless Conversion** Concertino is designed for 100% lossless roundtrip conversion with Concerto models.
13
24
14
-
## Lossless Conversion
15
-
16
-
Concertino is designed for 100% lossless roundtrip conversion:
// Convert from Concertino back to Concerto metamodel
57
-
constmetamodel=convertToMetamodel(concertino);
58
-
```
65
+
Despite the denormalization of metadata, the JSON serialization of Concertino models are often smaller in size than their Concerto AST equivalents due to a flatter, dictionary-like design and the removal of type-discriminators (i.e. `$class` properties).
59
66
60
-
## File Size Reduction
67
+
It is expected that models that make heavy use of inheritance would be larger than their equivalent Concerto AST.
61
68
62
-
Basic testing with pretty-printed, uncompressed files shows a 70-80% reduction in file size without loss of expressiveness.
69
+
Note that when converting models, the namespaces in the source Concerto model should be fully resolved (including for local type references).
63
70
64
71
## Example Concertino JSON Format
65
72
@@ -69,36 +76,27 @@ Below is an example of how a simple Concerto model is represented in the Concert
0 commit comments