c# - What if the UI metadata is stored in Database? What scenarios I need to consider before designing this type of application? -


i working on .net application , storing our ui elements in database(ui interface metadata). can guide me scenarios need consider in terms of maintenance, performance, deployment, upgrades of application while designing?

what trade offs in storing ui metadata in xml , ui metadata in database?

i think define examples of metadata storing.

some things think of when metadata ui:

  1. values of dropdowns. list of states example.
  2. dynamically created ui elements. can add textbox form via database.
  3. colors, fonts, alignments, etc. "a red button aligned left"

each has pros , cons being in database.

from experience, when putting ui information in database, application becomes hard reason about. you'll render ui , won't right. spend half day going through code , database trying figure out why. you'll flip few bits in database , render ui again , wonder why didn't work.

also there ton of boilerplate code generated when storing information ui in database.

some questions answer each ui element:

"would easier maintain if hard coded in ui?" it's easier change html in html editor instead of via database.

"will ui element need change lot on time?" unless user needs update/change/modify element, leave hard coded.

"do want ton of database tables ui elements?" can become nightmare maintain. example, survey of questions , answers might produce 5-10 tables.

i'd recommend trying keep ui elements as possible in application. when absolutely necessary should write them database.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -