You build a form. A week later, someone needs another field. Then a different customer wants that field hidden. Then comes a calculation, an extra step, and a slightly different version for another team.
Nothing particularly difficult. But someone still has to change the frontend, test it, and ship it.
I keep thinking about how much of this actually needs to be hardcoded.
What if an application loaded its forms and screens from JSON stored in a database? Fields, layout, validation, conditional visibility, calculated values. Your frontend components would still render everything, but the definition of each screen would be data.
You could change a form without deploying the frontend. Different customers could have different versions of the same screen without adding more conditions to the component.
Of course, you would still be shipping a change to users. Saving it in a database doesn’t remove the need for testing, permissions, versioning, or rollback.
And once your JSON contains expressions, events, and conditions, have you just invented another programming language?
That’s the part I find interesting. Where should configuration end and code begin?
My current approach is to keep authentication, backend logic, and custom components in code, while letting the screen definition control layout and behavior within those boundaries.
I’m building NGX View Builder around this idea for Angular, so I’m definitely biased. But I’d like to hear from people who have tried something similar, especially in applications with lots of forms or customer-specific workflows.
Did it make changes easier? Or did maintaining the configuration eventually become harder than maintaining the code?
Frontend
Source:https://dev.to/ngx_vb_5a114606ff9222c26a/what-if-forms-and-screens-lived-in-your-database-4pja
What if forms and screens lived in your database?
dev.to Angular0 views
PreviousBuilding Something Exciting in Open Source – Looking for Contributors!NextCreating customizable and reusable project templates with Node
Related posts
The Anti-Awkward First Date Playbook: Why Center-Table Physics Breaks the Ice
0dev.to UX
Build a freelance invoice generator in Python: JSON in, print-ready HTML out
0dev.to Productivity
The Reconciliation Tool I Almost Didn't Finish
0dev.to Productivity
Project manager LinkedIn About section examples you can adapt
0dev.to Career
What regex can tell you about an interview answer (and what it can't)
0dev.to Career
You take the first job offer because you're scared to negotiate. Let's fix that.
0dev.to Beginners