Dynamic Forms: Pattern or AntiPattern?

Posted by Segfault on Programmers See other posts from Programmers or by Segfault
Published on 2012-10-18T23:23:04Z Indexed on 2012/10/19 5:17 UTC
Read the original article Hit count: 491

Filed under:
|

I'm sure you've seen it. The database has a bunch of tables called Forms, Controls,FormsControls, ControlSets, Actions and the program that queries these tables has a dynamically generated user interface. It will read all the forms, load a home page that has links to them all, or embed them in some tabbed or paged home page, and for each of those forms it will read the various text boxes, check boxes, radio buttons, submit buttons, combo boxes, labels and whatnot from the controls and form-to-control join tables, lay those elements out according to the database and link all the controls to logic according to other rules in the database.

To me, this is an anti-pattern. It actually make the application more difficult to maintain because the design of it is now spread out into multiple different systems. Also, the database is not source controlled. Sure, it may make one or two changes go more quickly, after you've analyzed the program anyway to understand how to change the data and as long as you don't stray from the sort of changes that were anticipated and accounted for, but that's often just not sustainable.

What say you?

© Programmers or respective owner

Related posts about anti-patterns

Related posts about forms