I've been programming UI pages using DHTMLX framework for some time. Like with similar platforms while its native code is simple with short learning curve. However it is not readily available for storage in a database or XML.

I am developing a key-value based programming language with JavaScript where UI page code contained in a JSON object. Its aim is to shorten time to code UI pages and allow saving it in key-value format. The latter has an advantage of storing UI pages in a database or XML files.

The language interpreter parses JSON object when a page is loaded and issues appropriate commands to the browser as if native DHTMLX code is executed. It is fully compatible with native code and may be supplemented with classc HTML/JS for any special purpose functions which a UI page may require. There is automatic inclusion of required css/js libraries needed to run the framework code.

My question is whether in your view key-value approach to UI programming is viable. For example:

To create a one frame UI with two column grid classic code would be as follows:
Code:
  layoutA = new dhtmlXLayoutObject(document.body, "1C");
  layoutA.cells("a").setText('TEST PAGE');
  list = layoutA.cells("a").attachGrid();
  list.setColAlign("left,left");
  list.setHeader("Number, Text");
  list.init();
while in key-value pair:
Code:
  layout: {
     id     : 'layoutA'
    ,pattern: '1C'
    ,cells: [{
       caption: 'TEST PAGE'
      ,grid   : {
          id: 'list'
         ,columns: [
             {name:'Number',align:'left'}
            ,{name:'Text'  ,align:'left'}
         ]
      }
    }]
  }
My opinion is the latter is more intuitive and easier to learn plus the advantage of ability to store in key-value databases or xml.