Declarative UI Musings
Posted by Jeff Disher
Declarative UI Musings
The Cacophony 3.0 pre-releases mean that I am back into front-end UI world, making updates to support the recent core changes.

Now, as anyone who knows me can attest, I do NOT like working on UI, and definitely not JavaScript-based browser UIs. As anyone who has used my software can attest, I am also not any good at it.

So, this means that whenever I am working on something like this, I find myself thinking about how I wish there was a less manual way. It is an example of a situation where I think, "don't we have computers for this?"

This brings me back to the idea of declarative UI, as it always does. I am not sure that this would work and be sufficiently flexible but I have been wondering if this is a good opportunity to try it. After all, part of Cacophony was also about creating an area to experiment with other ways of doing things.

So, here is a list of some of the ideas circling my mind, recently:
-be a framework or a library, not both (most UI systems these days are horribly inflexible since they try to be both)
-I can probably think about this in terms of the old Cocoa Bindings ideas where there are "object" and "array" binding types
-the data declarations can probably be thought of in terms of types
-each type can either be a reference to a hand-written template or a composition of other types
-there likely needs to be some concept of "read-only" or "read-write", either at the type level or the reference level
-this means that there would be bi-directional data bindings, but also injected action bindings
-the ability to embed arbitrary "custom" bindings and templates, which are opaque to the system, is probably unavoidable (hence the "framework OR library" idea)
-the page probably still needs to have a notion of "navigation" and "content" when declaring relationships
-the types and templates need to be reusable across the system

Not sure if this is someone I will/can do, but it does seem like this might be a good to think about it,
Jeff.