The Data Driven UI To End ALL Data Driven UI



  • I'm working on a project that, long story short, is a simple data driven UI with some more complex validation in the back end. Basically, the requirement is to output various types on input boxes to take data values from the user that are dates and values in any combination.

    For example, we might have one data point that needs just a date. We then may have another data point that is a date and a value. Further we could have a date and 2 values.

    I recommended a data format that would be the most versatile, something on the order of a data point observation with a list of fields associated to that observation

    Observation
    {
    Field
    Field
    Field
    ...
    Field
    }
    

    Parsing is simple, life is good right?

    Enter William Ted Franken, we prefer to refer to him by his initials. The data is being ordered in date value pairs.

    • Need a date? Take this "observation" and put the date in the value and hide the date.
    • Need a date and a value? Great no problem.
    • Need a value? Take this "observation" and get the value, pass null in for the date and hide the date.
    • Need a date and 2 values? Here, take these 2 "observations" realize that there is a "flag" that tells you to use only 1 date, hide only one date, copy the first date to the second, render the 2 values.
    • Need 3 dates? Here take these 3 "observations" and hide all the value fields, copy the date into the value, and also submit the date into the date.

    .... the insanity goes on.

    I've been spending the past month trying to nudge the iceberg that is this guy, into a more sane data format citing reasons of simplicity and maintainability. Yesterday everything came to a head and our friend told me "sometimes simple isn't the best approach"

    I nearly lost my shit...



  • So.... is he going to be using XML then?



  • @Xyro said:

    So.... is he going to be using XML then?

    Yup XML is being stored in the database



  • D:



  •  @ShaggyB said:

    ...various inanities and insanities...
    Ew.

     

     @ShaggyB said:

    I've been spending the past month trying to nudge the iceberg that is this guy
    Ew.



  • @ShaggyB said:

    Yup XML is being stored in the database
     

    is the database stored on a wooden table?


Log in to reply