by danielvaughn · 4y ago · 0 comments
To put it simply, I think the trend towards no-code/low-code is misguided. The assumption behind these products is that code is slow, difficult, and expensive. I disagree - I think that "code" is merely a formalized written expression of what you want. It's actually the most efficient, easiest, and cheapest means to solving digital problems.
I believe anyone can write code if it's specific enough to a domain that they understand, so what I'm trying to do is create a hyper-domain-specific language around designing UI components. The goal is to have a platform agnostic base syntax, with "dialects" that can extend the language for any current or future platforms.
The idea is that designers could write in this language, and developers could build tools that will transpile this code into a consumable format for whatever system they're building for.
I have a very rudimentary demo site that's like halfway built: https://matry.design
edit - here is a simple example of what a component might look like in this language:
component Button
variants
color bg: #007BFF
text label: Click Me
elements
shape ButtonContainer
text ButtonLabel
style ButtonContainer
fill: $bg
padding: 10px
style ButtonLabel
content: $label
font-size: 16pxIt was a eureka moment for me. Why was UI design such a mess? It’s because the UI vocabulary came from publishing and graphic design, but UIs are not static and describing them in that way will always fall short.
I’m convinced that any UI language needs to incorporate a visual state diagram editor to really make a dent in the space.
UIs are not fixed objects, but responsive object reacting to user intent.
Does your language incorporate anything like this?
The difference, however, between Matry and something like xstate is that the actual state is intended to be left to developers, because I’m trying to create an interface that allows designers to just focus on what they need to focus on.
So take something like dark mode. A designer might allow for a Boolean parameter that determines whether a component render in dark or light mode.
But as to whether the browser supports it, or whether the user has that mode set in their system preferences - that’s the developers responsibility.
That doesn’t fully answer your question but it’s a complex topic so hopefully that gives you an idea as to where my thoughts are going.
There’s language, locale, time of day (which you mention), accessibility, screen resolution and those are just things off the top of my head that are implicitly exist as state in a designers head.
Then there’s the whole idea of transitions which are explicitly about state and in designers domains.
You can’t tell me designers don’t care about transitions. It’s developers who usually don’t care about that state.
And that last bit is my point. Let designers handle the state they care about. UIs will get better as a whole with it.
There’s a difference between determining the state, and deciding how that state affects the pixels on the screen. The former is the domain of engineering, and the latter is the domain of design. I’m not saying at all that designers don’t care about state.
The sour spot is things like Bubble, which while being a fine product suffer from “ok now am really coding but with a clunky UI instead of a text editor” which is a problem inherent in making universal nocode solutions.
With this in mind I think layouts and connected components should be provided to non coding users as templates. E.g. a site where you log in and can show notifications etc. is a single template. You then extend and style that.
My favored approach is to use what I’m calling a “this goes here, that goes there” syntax.
The idea is to give designers a conceptual framework that mimics how they understand layout, and allows them to describe positioning using a syntax that feels as close to natural language as possible.
Much easier said than done, of course. And there are good arguments for allowing the platform dialects to handle those more complex features (in addition to things like scrolling and animation).
The language syntax is in fact inspired by Python; mostly because I tried to remove as many extraneous characters as possible.