Skip to content

SolidLabResearch/FormViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form Viewer

A Form Viewer app based on Daniël Beeke's rdf-form.

This is a demonstrator for the Solid basic form builder challenge:

  • Create a Form Builder web app to generate a Form Template
  • Create a Form Viewer web app to that creates a simple web form using a Form Template
  • Make Form Template support for standard SHACL or ShEx shape expressions
  • The Form Template should be available on a public URL and loaded into the application at run time
  • Make the application to post data to an LDP resource
  • Make the application to post data to a Solid pod
  • Make the app store the provenance information of the results
  • The location of the LDP resource may be provided via the Form Template or be set at run time
  • Create a Result Viewer app that displays the results in a nice format (using the provenance information)
  • Use OpenURL as URL specification

The Form Viewer can create a Web Form when a template URL is provided.

Demonstrator

The Form Template

https://formviewer.patrickhochstenbach.net/book-review.form.ttl

The Form Viewer App

https://formviewer.patrickhochstenbach.net?rft.form=https://formviewer.patrickhochstenbach.net/book-review.form.ttl

  • Fill out a Web profile as actor and target
  • Fill out a URL as subject
  • Type any text in content
  • Send will post the data to a http container at https://httpbin.org

Usage

https://formviewer.patrickhochstenbach.net/?PARAMS

Where PARAMS :
 
  ctx_ver=Z39.88-2004             (optional protocol version)
  rft_val_fmt=http://formviewer.patrickhochstenbach.net (optional parameter definition)
  rft.form=FORM-TTL-URL 
  rft.data=DATA-TEMPLATE-TTL-URL  (optional)
  rft.hydra=HYDRA-TTL-URL         (optional)

E.g.

https://formviewer.patrickhochstenbach.net/?rft.form=https://formviewer.patrickhochstenbach.net/book-review.form.ttl&rft.data=https://formviewer.patrickhochstenbach.net/book-review.ttl

The hydra-ttl-url is a Turtle resource to provide information where the form results should be submitted. An example:

@prefix hydra: <http://www.w3.org/ns/hydra/core#> .

[]  hydra:endpoint <https://hochstenbach.inrupt.net/inbox> ;
   hydra:supportedClass [
       a hydra:Class ;
       hydra:method "POST"
   ] .

Hydra parameters:

  • hydra:endpoint : the web resource to send the RDF output to
  • hydra:method : the HTTP verb to use
  • hydra:next : (optional) the web resource to load after a successful RDF submission

Rationale

This app provides a demonstration for decentralized form handling: how to define a form, what data to put in the form, where the form needs to be stored is decoupled. Even the application you use to render the form and submit the results is decoupled from a specific server/website implementation.

  • Alice could publish a book review form on her website
  • Bob could use a FormViewer application to post book review resources to his own Solid Pod
  • Bob could invite Charly to edit the resource
  • Charly could use his own FormViewer to update Bob's book review with Alice's form definition
  • Charly could submit the results also to his own Solid Pod by creating a hydra resource

More examples