ddn-next-1

The DDN language

Short notation for a structured workarea, with optional settings when more detail is needed.

StructureViewsTablesDataNotesDefaultsLifecycleFiles

Indentation, names and quotes

DDN is UTF-8 text. Spaces indent nested blocks; four spaces are the recommended saved form. A physical line finishes an ordinary declaration, setting or table row. There are no required section brackets or semicolons.

Names are unique within their physical file. A colon gives an optional displayed title without changing that name. Values may be quoted when they contain punctuation or words used by a statement.

erd Sales : Customer relationships
    "Orders to review"
    "Customer: retail"
    connect "Customer: retail" to "Orders to review"

Use either quote delimiter and double that delimiter to include it literally. The other quote is ordinary content. Backslashes remain data in DDN quoting.

"text 'quoted text' more text"
'text "quoted text" more text'
"He said ""it's ready""."

A line beginning with // is a comment outside literal notes, drafts and table data. There are no inline comments. Markdown headings use #.

Views, definitions and connections

The explicit view form selects an exact profile. A definition at file level is reusable; use places an appearance without duplicating its identity.

element Customer as entity

erd Sales
    use Customer
    Order
    connect Customer to Order as assoc named OrdersPlaced : places

erd Support
    use Customer

view Process as flow.basic@1
    element Start as flow.start
    element Work as flow.process
    element Finish as flow.end
    connect Start to Work as flow.next
    connect Work to Finish as flow.next

The selected profile governs legal element roles, connection roles and endpoint rules. The native erd, mindmap and bar recipes keep common cases short. Every profile remains available by its exact identifier.

Table rows and column settings

data CustomerFields
    field:lt:45:12:3.type:ct:25.domain:lt.key:ct
    Id.int..primary key
    Name.varchar(25)
    "A dotted.name"."Text with a . inside"

erd Sales
    Customer from CustomerFields

The first row of a data body declares its columns. A dot separates cells, consecutive dots skip cells, and omitted trailing cells remain empty. Quoted punctuation stays inside a cell. Extra cells beyond the header are diagnosed.

The optional column settings are name:alignment:percentage:min-characters:max-lines. Empty positions between colons omit settings. Alignment uses horizontal r, l, c or f, then vertical t, m or b. For example, ct means centre/top.

Columns without percentages share the remaining space equally. If every column has a percentage and the total is below 100, the rightmost column grows. Excess allocation is reduced from the largest columns, sharing tied reductions. Wrapping increases the displayed row height up to its limit; ellipsis marks clipped text. A table that cannot fit displays its shaded-square indicator.

A plain list of field names uses fields without a header:

erd Sales
    Customer
        fields
            Id
            Name
            Email

Separate and changing data

Named datasets can feed multiple consumers. A source declaration identifies a registered provider and its configuration; it does not execute arbitrary code or grant access to a network service.

source CustomerFeed as host
    with
        channel customer-fields
        update replace

data LiveFields from CustomerFeed
    with
        mapping
            field source_name
            type source_type
        key source_id
        persist reference

The host supplies revisioned data. Schema and rows change coherently; failures retain the previous successful revision as stale. A viewer can receive these updates while remaining read-only.

Notes and formatted text

notes customer_notes : ##Customer design
    The **name** is required,
    and this continues the same paragraph.

    A new paragraph may contain *emphasis*,
    ++underlining++ or a simple list.

    - Review naming
    - Confirm ownership

Blank lines separate paragraphs; ordinary line breaks wrap into one paragraph. Headings, lists, quotations, code and links use the supported Markdown subset. Raw HTML is not interpreted. Markdown tables and images use DDN table and asset declarations instead.

Properties and defaults

defaults element as entity
    font serif

erd Sales
    Customer
    with
        style.font_size 12pt

Properties use an indented with block; nested records and dotted paths are equivalent. At an occurrence, eligible explicit file values resolve from occurrence, definition, view defaults, active workarea defaults and declaring-file defaults. Then eligible type-scoped CSS applies, then fixed standard defaults.

Removing an authored setting restores omission. Explicit values equal to the default remain explicit. Names, references, status and acceptance are semantic content and do not inherit from CSS.

Search every property and omission rule

Drafts and lifecycle

erd Sales
    Customer
        draft fields
            Identifier
            Name
            Perhaps a preferred contact method
        with
            status draft

A draft body is literal text until the user explicitly converts it into structured columns. The conversion preserves the original draft. Body editor mode, drawing style, visible field details and lifecycle status are separate choices.

StatusMeaning
draftFree-form design content is allowed.
in-progressStructured work may still lack settings or data.
in-reviewContent must be complete and pass verification.
acceptedRecords acceptance date, time and user. An authorized user may reopen it for review or work.

These are user actions with explicit authority. A theme or successful render does not accept a design.

One active workarea and included files

version ddn-next-1
include "shared.ddn"

workarea Planning as ddn
    with
        background.color "#f5f5f5"

erd Sales
    use "shared.ddn"::Customer

The first opened file supplies the active workarea. Included views, data and documents participate in it while retaining their physical-file identity. An included file’s workarea declaration is inactive in that opening context. References across files always use file::name; loading order never determines identity.

A document is a view designed for targeted output. Declaring an output format and having an installed exporter are separate concerns; the utility reports unsupported output capabilities explicitly.