Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
JSONForms: Customizable JSON Schema-based forms (github.com/eclipsesource)
35 points by radus on May 24, 2022 | hide | past | favorite | 5 comments


This is really really cool, but... incoming rant

So much of the Javascript tooling is reinvention of XML technologies - XML Schemas and XForms have been around for decades, and were standardised long ago. XForms supported data bindings, data schemas, conditional rendering and more - and this is a poor facsimile of all of that.

For some reason, web development schismed and decided that XML was "old" and Javascript and JSON were the way forward. But in their wake through so much knowledge and technology under the bus.


I've kept on top of the current state of XForms for years now because they are the pinnacle of "DRY" for "CRUD" however they aren't ubiquitous due to the ecosystem around them having significant tradeoffs if you aren't already invested in certain technologies. Every now and then XForms looks like it will fit, but then it fails at a later design review. This is mainly due to a lack of options when it comes to the backends to process them. Like many XML family technologies its a deeply corporate world with a lot of lock in.


At crossref.org we are building out a form-based application using this library, and also working on the development of the VueJS/Vuetify renderer set https://github.com/eclipsesource/jsonforms-vuetify-renderers.

The UISchema is a compromise, and I think that largely is a result of the limitations of JSON Schema when applied to form generation - it's good, but it's not perfect.

There is an open discussion on the JSON Schema GH about creating a custom JSON Schema vocabulary for form generation, which could answer some of these limitations https://github.com/json-schema-org/community/discussions/70


I built out an implementation of this last week! Very easy to wire our pre-existing React input components into their rendering system.

I was less pleased with the “uischema” method of layout, found that limiting and not “react-y”. But was able to hack together a custom thing that used CSS Grid, so good enough.


Coupling this with pg jsonb fields can be really powerful. Opens a lot of doors for configurable UI with robust validation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: