2

I am trying to find some javascript front-end (in browser) web form library, which has the following requirements:

  • Lightweight enough for use in multi-page application (as contrasted with one-page application)
  • Compatible with Bootstrap 3, responsive design
  • Using json-schema for data model description, json or extensions to json schema for form description (like choice or parameter for the widget)
  • Support for arrays, and focus on CRUD operations, interacting with backend (backend may add it's own validation rules). Python is on the backend, colander as validation library. Deform is what is wanted to be replaced with front-end library.
  • The idea is that there will be minimal need to tweak forms once they are expressed in JSON Schema. That is, given schema (or json hyper-schema), form and data one can be more or less sure that what is rendered, looks and feels like.
  • i18n ready
  • It is better to be open source, bower is used to gather components together

The purpose of the application is to manage (= CRUD) "resources", which are interconnected, and may have metadata. The resources are not cut in stone (actually, they may come from linked/semantic data, and adding new form should not require full object-oriented DSL on the backend and another one in the frontend), datatypes are usual, including sequences and mappings. That is, application is mostly data-driven, with exceptions only where declarative style is infeasible.

So far, candidates are:

  • AngularJs - seems to fit the bill, but is too large for this specific application. Angular-schema-form is probably what fulfill functional requirements
  • Ember Js - interesting, but not sure how mature ember-data is and the support for the use cases
  • React - fast, but not sure how much programming is needed to get the generic form functionality. Addon?
  • KnockoutJs - seems like also requires a lot of programming, but maybe there is some add-on for the task
  • jsonform by description fits the requirements, but not sure how well it really performs
  • json-editor is another library for forms which use extended json-schema and also seems to be suitable
  • AlpacaJs has a lot of functionality, can do what is required, but seems like too big with a lot of dependencies and also too strict requiremenets on versions. (maybe, this is wrong assessment)

There surely are other choices.

What can be recommended from the above or otherwise?

0

For a generic form in React, you are going to need to know enough about JavaScript event handlers and basic HTML. Take a look at this guide and if its too daunting, then it would probably not be the way to go for you:

https://reactjs.org/docs/forms.html

If after reviewing the above code, you find it's not a daunting task for you then you will be happy to know React would work with Bootstrap and you can follow the guide here:

https://facebook.github.io/create-react-app/docs/adding-bootstrap

  • Thank you. React is of course good suggestion now. But the question is about providing json schema (plus maybe some hints - like in case of alpaca) and getting the form rendered. I do not want to render concrete form (it's usually trivial in any framework), I want to render form given (possibly dynamically generated) schema. – Roman Susi Mar 11 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.