Create a simple form engine with WebSharper.UI.Next in F#
Create a simple form engine with WebSharper.UI.Next in F# WebSharper came out with WebSharper.Forms. It is a terse DSL to build form, I posted a tutorial on it few months ago https://kimsereyblog.blogspot.co.uk/2016/03/create-forms-with-websharperforms.html . It’s very powerful as the abstraction handles most of the scenarios. Today I would like to show anothe way to create forms by building a form engine. This post will be composed by 4 parts: Define the domain Implement the renderers Use it 1. Define the domain Defining a model is tricky. It needs to be both flexible enough to handle all needed scenario but it also needs to be simple enough that there aren’t too many options which would make the domain messy. I will give an example later to illustrate this. For a form engine, the domain model is composed by the elements of form and the submission behaviors. Form elements For this example we will just implement the input and input area . Implementing the rest of the con...