liveBook · Manning

Projectional editing

As explained in Building User-Friendly DSLs

An editor that presents a structured representation of language content as a user interface for manipulating that content.

Projectional editing presents structured DSL content as a user interface rather than as editable plain text. The editor projects the underlying data without losing its structure, allowing users to manipulate content according to the language’s permitted form. section 1.2.2 section 1.5

A projectional editor works directly on an abstract syntax tree (AST). Unlike a textual DSL workflow, it does not depend on editing characters and then parsing them into an intermediate representation. section 1.2 section 1.2.3

Within a Domain IDE, projectional editing supports a practical development flow:

  • The frontend displays DSL content in a browser and lets domain experts manipulate it through the editor. section 1.2.2
  • The backend stores the structured content in a repository and exposes it through an API. section 1.2.2
  • A build system feeds the stored content to a code generator, which produces parts of the Runtime. section 1.2.2
Figure 1.14 The architecture of the Domain IDE
figure

Use the architecture diagram to trace how the projectional editor connects domain experts, the repository, and generated Runtime code. section 1.2.2

How Building User-Friendly DSLs covers it

How deep it goes
Explains the editor’s structured representation and AST basis, while deferring detailed implementation and textual parsing topics.
Examples
Uses a browser-based Domain IDE, structured DSL content, a repository, and generated Runtime code as concrete artifacts.
What you can do after
Evaluate/understand how structured DSL content moves from browser editing through storage and code generation into a Runtime.
How it connects
Connects abstract syntax trees, domain-specific languages, Domain IDEs, code generation, and textual DSL parsing.

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.