Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How using forms maps to following links #17

Open
chrysn opened this issue Oct 22, 2021 · 0 comments
Open

How using forms maps to following links #17

chrysn opened this issue Oct 22, 2021 · 0 comments

Comments

@chrysn
Copy link
Member

chrysn commented Oct 22, 2021

This is a rough sketch of how I think that the interaction model can be thought of only in terms of links, even though it involves forms. It is based on ideas developed together with Matthias, Klaus and Sebastian (IIRC) in a 2019 workshop.

This is likely not how we'd teach forms, but I think good to have for a formal model; not sure where and how that'd go into the text:

  • The agent arrives at a context where it wants to follow a form; the form is a blank node linked from the context and has attributes.
  • The agent follows the link and is now at the context of that form (really just a blank node); it is now preparing the form, which on its own is not actionable yet.
  • The agent, recognizing some properties of the form (say, the presence of a field) populates the field. This is done not in place but at a new blank node that has some (see below) properties of the old form, an additional new property, and is linked from the original form with a "internal:has-populated-successor" relationship.
    • Conveniently, thus the history corresponds to an "Undo" step of the form population.
  • Populating the form is repeated until the client finds the form to be ready and actionable
  • The client performs whichever action the form now prescribes. Thereby it creates and follows an "internal:was-executed-into" relation from the actionable form to the form result.
    • This action result is usually an anonymous node too, if the form method was a POST and has no Location.
    • If the form method was a GET, then the new state actually has a URI representing it. [I imagine that this primarily happens with forms that don't have a target URI but a URI template in there, and the URI template is turned into a form target as one of the form population steps.] In that case, the form submission is not distinct at all from following the internal:was-executed-into link.

What precisely is transferred to the new blank node is currently best explained with hand-waving magic. There may not be a general rule, if forms can take arbitrary shapes. If we arrive at a more concrete model of forms (say, with field definitions and default field values), that can have concrete steps too. Possibly, no properties are "cloned over" at all, and the act of submitting a form looks back along the edges of internal:has-populated-successor links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant