Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>hey this is not difficult to achieve at all and its not a bad idea at all. it all depends on your project needs. a lot of software products (mind you not projects but products) depend upon this model - so they dont have to rewrite their code / ui logic for different client needs. clients can customize their ui the way they want to using a designer form in the admin system</p> <p>i have used xml for preserving meta data for this sort of stuff. some of the attributes which i saved for every field were:</p> <ol> <li>friendlyname (label caption)</li> <li>haspredefinedvalues (yes for drop down list / multi check box list)</li> <li>multiselect (if yes then check box list, if no then drop down list)</li> <li>datatype</li> <li>maxlength</li> <li>required</li> <li>minvalue</li> <li>maxvalue</li> <li>regularexpression</li> <li>enabled (to show or not to show)</li> <li>sortkey (order on the web form)</li> </ol> <p>regarding positioning - i did not care much and simply generate table tr td tags 1 below the other - however if you want to implement this as well, you can have 1 more attribute called CssClass where you can define ui specific properties (look and feel, positioning, etc) here</p> <p>UPDATE: also note a lot of ecommerce products follow this kind of dynamic ui when you want to enter product information - as their clients can be selling everything under the sun from furniture to sex toys ;-) so instead of rewriting their code for every different industry they simply let their clients enter meta data for product attributes via an admin form :-)</p> <p>i would also recommend you to look at <a href="http://en.wikipedia.org/wiki/Entity-Attribute-Value_model" rel="nofollow noreferrer">Entity-attribute-value model</a> - it has its own pros and cons but i feel it can be used quite well with your requirements.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload