(SimpleSchema + Autoform) vs (JSON schema + some json form generator)

I have to decide between the 2 for a hybrid react/blaze app and I’m looking for impressions… Has anybody had experience with both and can give a reason why I should choose one or the other?

I need to dynamically generate forms and validate JSON. I’m making an app that looks a lot like this.

####Autoform + SimpleSchema

pros

many Custom Input Types (map, evernote, WYSISYG editors, etc)
I know it already
#####cons
can’t save schemas to db
I’m trying to move away from blaze, to react

JSON schema + some form generator

pros

it’s just JSON itself so savable to mongo
compatible with http://schema.org/
#####cons
it’s just JSON, so there’s much less support for widgets

Is there a solution the gives me both serializability of the schemas themselves AND extensible behavior?

DClinical Track has a demo app (CKCC) which uses autoforms and saves a dehydrated schema to the database, along with an integrated form builder. It was rather gnarly to get working, and I can’t say I necessarily enjoyed working with autoforms.

That being said, we’re getting ready to fork autoforms into the release track, so we can move our various themes and the schema hydrator/dehydrator into the package. And clean up the documentation a bit.

Also, we’ve created about 1500 e2e form tests so far for AutoForms, which are not tied to implementation, and can be used to walk AutoForms over to React. Our plan is to get Autoforms running on whatever templating layer that runs on React and exposes the Spacebars API. Once done, we’ll clone the react templating layer and autoforms into a new package, identify the necessary interfaces, hardware them, then factor out the templating until it’s pure React. Something like that, anyhow.

1 Like