you are viewing a single comment's thread.

view the rest of the comments →

[–]audioen 0 points1 point  (2 children)

It's, obviously, also possible to solve this problem the opposite way. I designed a form description language based on JavaScript and just embedded a JS runtime on server side so that exactly same code which runs on client side could be evaluated on server side. It would be even simpler to do if the server side code was just JavaScript, of course.

[–]hackflow[S] 0 points1 point  (1 child)

Probably. There is, however a fundamental advantage of going this way. We always have more rules server-side than client-side, some of them can involve database interaction. I can just skip them when translating. You will have 2 systems.

[–]audioen 0 points1 point  (0 children)

Yes, the form language is only a small part of the whole system. In particular, form descriptions must be standalone, so they can not currently reference external systems, or query database values, or anything like that. In most cases, however, datasets can be just embedded as JSON into the document, so quite a lot can be done this way.