| Re: "How do you do this without changing the way we program?" Let's change the way we program. If we outgrow trees, we've outgrown trees. I don't know if existing code will be easy to convert. It's kind of like when OOP IDE's fell out of favor for web stacks: the old OOP classes couldn't be reshaped for web because the web is state-poor and OOP is state-rich. We had to dump OOP libraries and stacks into the trash. Re: "What does the query language look like and how do you expose this to the user? This is especially challenging because the query language needs to serve so many different roles." I suggest using existing RDBMS and SQL. There's no reason to reinvent the wheel unless inherent flaws can be found in RDBMS for code management purposes. I haven't found any yet in my little experiments in "table oriented programming". I take that back a bit. Different UI components/widgets will have different attribute structures. It's hard to change the schema every time a new widget type is added. Possible solutions include Dynamic Relational, or a Windows-Registry-like "attribute tree" for UI models. Attributes of UI widgets then could be accessed like: setAttrib("screenX.widgetY.maxHeight", 37);
// context-based shortcut:
setAttrib("currentWidget.maxHeight", 37);
The second form is handy because instead of writing explicit loops, event triggers may be used traverse and customize per-widget behavior. The traversal mechanism will create a reference to the "current" item per behind-the-scenes looping to simplify path references. More samples: // sequence control (display order):
setAttrib("screenX.widgetY.sequence", 47.5);
// deactivate:
setAttrib("screenX.widgetY.active", false);
// alternative:
setAttrib("screenX.widgetY.status", "inactive");
// more uses of "status" attrib:
setAttrib("screenX.widgetY.status", "hidden");
// Grid samples:
setAttrib("screenX.grid4.row.7.col.9.value", "foo");
setAttrib("screenX.grid4.row.7.backGroundColor", "green");
Helper API's would probably simplify grid path management. |
I've found RDBMS is quite limited in terms of graph traversal. Maybe you've found a way around this? Would be happy to riff on that.