liveBook · Manning

Concept label

As explained in Building User-Friendly DSLs

The label in an object-relation diagram object that identifies the concept of which the object is an instance.

A concept label identifies the concept represented by an object in an object-relation diagram. It functions like an object type: an object labeled Thing is an instance of Thing. The label occupies the upper compartment of the object box, above its settings. section 2.1

Use concept labels to distinguish object roles and navigate encoded AST data.

  • Access the label of an encoded AST object through its concept property, as in rental.concept. section 3.2.1
  • Keep the label conceptually separate from settings: settings store property values, while the label identifies the represented concept. section 2.1 section 3.2.1
  • Treat label changes as structural changes that may require AST migration, such as changing Data Attribute to Attribute. section 10.3.2

Reading and changing a label

For an encoded rental object, rental.concept evaluates to 'Record Type'. During migration, an object whose concept is 'Data Attribute' can be renamed to 'Attribute', while its initial value setting is renamed to value. section 3.2.1 section 10.3.2

Figure 2.3 A simple ORD containing only one object, with annotations
figure

Annotated object notation shows the concept label in relation to the object’s settings. section 2.1

How Building User-Friendly DSLs covers it

How deep it goes
Defines the label, shows its object-box position and JavaScript access, and reaches structural renaming through AST migration.
Examples
Uses Thing, Record Type, Data Attribute, Attribute, and rental.concept as notation and JavaScript examples.
What it assumes
Assumes basic object-relation diagram notation and JavaScript property access while defining labels and settings in context.
What you can do after
Evaluate/understand object labels in encoded ASTs and recognize when label changes require migration.
How it connects
Connects concept labels with objects, settings, abstract syntax trees, DSL structure, and AST migration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building User-Friendly DSLs. The section links point to the parts of the book it draws on.