Skip to content
šŸ§¾ FORM: Business X-Forms ā€” https://form.n2o.dev
Erlang JavaScript CSS HTML Elixir
Branch: master
Clone or download
Ruslan Moroz
Ruslan Moroz new vsn
Latest commit 33aeb4c Feb 17, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows consistend naming, github actions Oct 27, 2019
include added id_rules to formReg record Feb 6, 2020
lib added formReg Dec 10, 2019
man Merge branch 'master' of github.com:synrc/form Nov 21, 2019
priv Merge branch 'master' of github.com:synrc/form Jan 14, 2020
src new vsn Feb 17, 2020
.formatter.exs LICENSE Jun 20, 2019
.travis.yml rebar3 dialyzer 4.10.5 Oct 31, 2019
CNAME Update CNAME Nov 6, 2019
LICENSE LICENSE Jun 20, 2019
README.md Update README.md Oct 31, 2019
index.html index Jan 8, 2020
mix.exs new vsn Feb 17, 2020
rebar.config wip Jul 30, 2019
sys.config elixir Jun 20, 2019

README.md

FORM: Declarative Documents

Actions Status Build Status Hex pm

Intro

  #document { name = Name, sections = [
      #sec { name=[<<"Input the password "
                     "you have received by SMS"/utf8>>,
             nitro:to_list(Phone#phone.number)] } ],

    buttons  = [ #but { name='decline',
                        title=<<"Cancel"/utf8>>,
                        class=cancel,
                        postback={'CloseOpenedForm',Name} },

                 #but { name='proceed',
                        title = <<"Proceed"/utf8>>,
                        class = [button,sgreen],
                        sources = [otp],
                        postback = {'Spinner',{'OpenForm',Name}}}],

    fields = [ #field { name='otp',
                        type=otp,
                        title= <<"Password:"/utf8>>,
                        labelClass=label,
                        fieldClass=column3}]}.

Spec

Documents or Forms consist of set of fields grouped in sections and a row of control buttons. It mey also contain fields of customizable types.

  -record(document, { ?ITERATOR(feed),
                      name,
                      base,
                      sections,
                      fields,
                      buttons,
                      access }).
 -record(field,     { id, sec=1, name, pos, title,
                      layout, visible=true,
                      disabled=false, format="~w",
                      curr=[], postfun=[], desc,
                      wide=normal, type=binary,
                      etc, labelClass=label,
                      fieldClass=field,
                      boxClass=box,
                      access, tooltips=[],
                      options=[], min=0, max=1000000,
                      length=10, postback }).
 -record(sec,       { id,
                      name,
                      desc="" }).
 -record(but,       { id,
                      postback,
                      name,
                      title,
                      sources=[],
                      class }).
  -record(sel,      { id,
                      postback,
                      name,
                      title }).
 -record(opt,       { id,
                      postback,
                      name,
                      title,
                      checked=false,
                      disabled=false,
                      noRadioButton=false }).
 -record(validation, { name, type, msg,
                       extract = fun(X) -> X end,
                       options=[], function,
                       field={record,pos} }).

KVX Data Model

The Metainformation is used to generate KVS Data Model. The KVS layer provides persistence.

NITRO Applications

JavaScript Web Application is generated using Metainformation and Data Model. N2O is used as a domain specific language to generate forms. JavaScript/OTP is used to generate form. Average rendering speed is 25 forms per second. Erlang and JavaScript/OTP are used to define validation rules applied to documents during workflow.

BPE Processes

Workflows are complimentary to business rules and could be specified separately. BPE defenitions provide front API to end-user applications.

Credits

  • Maxim Sokhatsky

OM A HUM

You canā€™t perform that action at this time.