

GitHub - JamesRandall/FormSharp: No one likes the drudgery of building form logi...
source link: https://github.com/JamesRandall/FormSharp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

FormSharp
This is very much work in progress - here be killer bunnies, but they're quickly being pacified
FormSharp aims to take the drudgery out of creating data entry forms in F# by taking care of all the plumbing and presentation and hiding it behind a DSL. I've found myself in a couple of situations where I've had to build broad data entry systems and writing and maintaining this code manually will kill a small team.
The aim is to allow forms to be defined using a fairly simple and abstract DSL:
That can then be executed in different runtimes / environments using an appropriate renderer / executer:
Keeping a few goals in mind as I work on it:
- Support for multiple runtimes initially React, plain JavaScript and Spectre (console).
- Support for multiple and custom renderers.
- Easy to use - its supposed to save effort, not create effort.
The code is emerging from a production system and a poc and so is of varying quality and is definitely subject to significant change.
If you want to take a look at how it works best place to start is with the Fable.React.Tailwind.Sample app.
Docs to follow as I build it out.
I was really tempted to call it Phorm but their are some Phorm-esque things in PHP land.
Tests
Running the tests requires the installation of Playwright for .NET.
Things to do
In a rough order.
- Automated tests - wip, using PlayWright
- GitHub Action for build, test and package release
- Token injection for API calls (skeleton is their)
- Add support for loading, saving etc. from Fable Remoting using friendly syntax
- Transformers at point of load and save
- Additional components - check box, radio buttons, text areas
- Support injection of custom components in forms
- Add a Bootstrap renderer to the React package
- Add a vanilla HTML (no React) package (Tailwind and Bootstrap)
- Bring the Spectre support into the public repo from my poc
Request for features, help and bug fixes
Sure. Go ahead. Issues and discussions are open. But I may ask for money in return. Releasing OSS doesn't come with any obligation and although some people seem to live in a world where money isn't needed most of us have a mortgage and bills to pay.
Contributing
Best to speak to me first as I'm changing things a lot at the moment.
License
Available under MIT. See the LICENSE file.
Recommend
-
10
-
6
Benefits of Having More YouTube Likes
-
6
Day 12: Why Julia likes Julia Firstly, I will never get tired of the fact that Julia is called Julia. It is the best. It however makes it really hard to search for email with “Julia” in them in my inbox.
-
6
7 Signs Someone Actually, Genuinely Likes You#4. You will see the “Duchenne smile”
-
7
应对苦差事的动力 The Initiative Against Drudgery. February 18, 2021February 18, 2021 Feb 19, 2021 at 6:49 AM 兴起,发光!(以赛亚书 60:1 和合本)
-
5
Shortwave just rescued my inbox from the drudgery of Gmail The Google Inbox successor I’ve been waiting for By...
-
1
Super simple serverless link shortener This is an insanely simple link shortener that makes use of Lambda and DynamoDB to keep the cost low. Mostly posting as I thought it might be a useful example of some AWS stuff for folk.
-
7
Serverless Web Notifier This is a pretty simple serverless change detector for websites that will regularly check a web page and see if it has been updated and if so send you a text message. Useful for, you know, getting your hands o...
-
10
F# / Fable Tetris Simple implementation of Tetris in F# using Fable to run it in a browser. Might not be an exact match for "real" Tetris. Was only distracting myself with some code really, don't expect AAA code quality! A bui...
-
5
The Oracle Database Features Site – reducing Oracle Documentation Drudgery If there’s one thing Teddy approves of it’s eating you’re own Dog Food…although, he does appreciate the value of a varied diet…...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK