Form rendering & rendering overall #17

Open
opened 2026-06-16 07:48:45 +00:00 by Martas · 0 comments
Owner

Rendering

There are only two places where rendering can occur:

  1. Frontend
  2. Backend

Current implementation renders on backend, which is inherently wrong, because backend cannot know about the representation that the frontend uses. Instead, all the components in the system must agree on internal representation of the form. Then two rendering engines might exist:

  • JS one for rendering forms & success messages
  • PHP one for rendering emails

Requirements

The internal representation will be a linearized collection of elements. If the elements could not form a linearized structure, it would be non-deterministic for the user, which obviously make no sense.

The internal structure could be marked in HTML

<form>
    <text-field validator="email">
    <timetable-reservation-input timetable-id="12">
    <row>
        <submit-button/><action-button/>
    </row>
</form>

Compiler

The renderer is basically a compiler that compiles XML definition to HTML code. The JS will need a registry of custom elements.

# Rendering There are only two places where rendering can occur: 1. Frontend 2. Backend Current implementation renders on _backend_, which is inherently wrong, because backend cannot know about the representation that the frontend uses. Instead, all the components in the system must agree on internal representation of the form. Then two rendering engines might exist: - JS one for rendering forms & success messages - PHP one for rendering emails ## Requirements The internal representation will be a _linearized collection of elements_. If the elements could not form a linearized structure, it would be non-deterministic for the user, which obviously make no sense. The internal structure could be marked in HTML ```html <form> <text-field validator="email"> <timetable-reservation-input timetable-id="12"> <row> <submit-button/><action-button/> </row> </form> ``` ## Compiler The renderer is basically a compiler that compiles XML definition to HTML code. The JS will need a registry of custom elements.
Martas added this to the Board project 2026-06-16 08:35:59 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Martas/Reservair#17