dotnet-websharper / forms

Licence: Apache-2.0 license
A library to build declarative, composable, reactive user interfaces with WebSharper.

Programming Languages

F#
602 projects
HTML
75241 projects

Projects that are alternatives of or similar to forms

Reflex Dom
Web applications without callbacks or side-effects. Reflex-DOM brings the power of functional reactive programming (FRP) to the web. Build HTML and other Document Object Model (DOM) data with a pure functional interface.
Stars: ✭ 301 (+2408.33%)
Mutual labels:  reactive, frp
Rxcombine
Bi-directional type bridging between RxSwift and Apple's Combine framework
Stars: ✭ 741 (+6075%)
Mutual labels:  reactive, frp
Outwatch
A purely functional and reactive UI framework
Stars: ✭ 376 (+3033.33%)
Mutual labels:  reactive, frp
callbag-rs
Rust implementation of the callbag spec for reactive/iterable programming
Stars: ✭ 25 (+108.33%)
Mutual labels:  reactive, frp
reactive-states
Reactive state implementations (brainstorming)
Stars: ✭ 51 (+325%)
Mutual labels:  reactive, frp
Reactive Forms
(Angular Reactive) Forms with Benefits 😉
Stars: ✭ 276 (+2200%)
Mutual labels:  reactive, forms
Reflex Platform
A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
Stars: ✭ 602 (+4916.67%)
Mutual labels:  reactive, frp
purescript-pop
😃 A functional reactive programming (FRP) demo created with PureScript events and behaviors.
Stars: ✭ 33 (+175%)
Mutual labels:  reactive, frp
Sodium Typescript
Typescript/Javascript implementation of Sodium FRP (Functional Reactive Programming) library
Stars: ✭ 102 (+750%)
Mutual labels:  reactive, frp
Form
Form is an iOS Swift library for building and styling UIs
Stars: ✭ 99 (+725%)
Mutual labels:  reactive, forms
reflex-dom-ace
Reflex wrapper for the ACE editor
Stars: ✭ 12 (+0%)
Mutual labels:  reactive, frp
Reactive forms
This is a model-driven approach to handling form inputs and validations, heavily inspired in Angular's Reactive Forms
Stars: ✭ 135 (+1025%)
Mutual labels:  reactive, forms
reflex-dom-semui
A reflex-dom API for Semantic UI components
Stars: ✭ 22 (+83.33%)
Mutual labels:  reactive, frp
Mobx Keystone
A MobX powered state management solution based on data trees with first class support for Typescript, support for snapshots, patches and much more
Stars: ✭ 284 (+2266.67%)
Mutual labels:  reactive, frp
reactive-rs
Streams and broadcasts: functional reactive programming in Rust.
Stars: ✭ 28 (+133.33%)
Mutual labels:  reactive, frp
Xreact
reactive x react = xreact
Stars: ✭ 565 (+4608.33%)
Mutual labels:  reactive, frp
reflex-native
Framework for writing fully native apps using Reflex, a Functional Reactive Programming library for Haskell.
Stars: ✭ 40 (+233.33%)
Mutual labels:  reactive, frp
reactify
The first and only true Functional Reactive Programming framework for Scala.
Stars: ✭ 77 (+541.67%)
Mutual labels:  reactive, frp
Reflex
Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse.
Stars: ✭ 910 (+7483.33%)
Mutual labels:  reactive, frp
Dirty Check Forms
🐬Detect Unsaved Changes in Angular Forms
Stars: ✭ 105 (+775%)
Mutual labels:  reactive, forms

WebSharper.Forms

Forms are a functional, composable, and type-safe form abstraction for building reactive user interfaces in WebSharper, similar to Formlets but with fine control over the structure of the output.

A sample Form:

let LoginForm () =
    Form.Return (fun user pass -> user, pass)
    <*> (Form.Yield ""
        |> Validation.IsNotEmpty "Must enter a username")
    <*> (Form.Yield ""
        |> Validation.IsNotEmpty "Must enter a password")
    |> Form.WithSubmit
    |> Form.Run (fun (u, p) ->
        JS.Alert("Welcome, " + u + "!")
    )
    |> Form.Render (fun user pass submit ->
        div [] [
            div [] [label [] [text "Username: "]; Doc.Input [] user]
            div [] [label [] [text "Password: "]; Doc.PasswordBox [] pass]
            Doc.Button "Log in" [] submit.Trigger
            div [] [
                Doc.ShowErrors submit.View (fun errors ->
                    errors
                    |> Seq.map (fun m -> p [] [text m.Text])
                    |> Doc.Concat)
            ]
        ]
    )

Wait, formlets and piglets? - I am confused

WebSharper.Forms (this project, aka. reactive piglets or WebSharper.UI.Piglets) is a reactive implementation of the original WebSharper.Piglets library, using WebSharper.UI, WebSharper's main reactive library.

Piglets are a novel UI abstraction pioneered by WebSharper, and are first documented in this IntelliFactory research paper:

Loic Denuziere, Ernesto Rodriguez, Adam Granicz. Piglets to the Rescue: Declarative User Interface Specification with Pluggable View Models. In Symposium on Implementation and Application of Functional Languages (IFL), Nijmegen, The Netherlands, 2013. ACM, PDF.

Formlets have similarly been published in academia, among others in this 2007 draft paper by Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop at the University of Edinburgh.

Formlets have first been ported to F# for WebSharper in 2009, enhanced for dependent flowlets and published in this IntelliFactory research paper:

Joel Bjornson, Anton Tayanovskyy, Adam Granicz. Composing Reactive GUIs in F# Using WebSharper. In Symposium on Implementation and Application of Functional Languages (IFL), Alphen aan den Rijn, The Netherlands, 2010. pp. 203-216. Springer

This early formlet library is available as WebSharper.Formlets, and a WebSharper.UI-based re-implementation is available as WebSharper.UI.Formlets.

Given that reactive forms/piglets are more flexible than formlets, we recommend that you use WebSharper.Forms (this project) in your applications.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].