<ul render="@items: (name,index) of ['dog','cat','ram'] / 'item';"></ul>
Maybe I am special, but this looks absolutely cursed to me. Logic in an HTML attribute string? Please no.
<ul render="@items: (name,index) of ['dog','cat','ram'] / 'item';"></ul>
Maybe I am special, but this looks absolutely cursed to me. Logic in an HTML attribute string? Please no.
These seemingly simple template languages that promise an escape from the "unnecessary" bloat and complexity of the modern web are doomed to fail. Any level of adoption will drive deeper usage, which will drive more complex use cases, which will force more bolted-on general programming language features. Eventually your users discover (the hard way) why all the complexity in modern web frameworks exists, but now they're stuck programming in a shitty template language that is underbaked, awkward to use, has no ecosystem, shitty tooling and some rancid expression DSL you have to memorize. Cursed indeed.
But there's something you find when you follow a practice driven process, and the realisation that brought data binding in OOHTML is one of them.
I'm happy to write a post about this when I have more time. But thanks for your feedback.
And now you go down the same path.
If you are building real applications with this then you will find that OOHTML will need to be repeatedly extended in order to fit the more complex use cases that come with deeper usage. You will end up reinventing the wheel but worse. That's a great outcome if the project is a hobby or learning experience. But if you're trying to deliver real commercial outcomes with this tech I would start rethinking things now.
I'm happy to incorporate constructive feedback on this project, and it's early age affords us a great opportunity to do just that.
So what's your thought on the challenge?: a native way to bind an element's css properties, class list, attributes, etc. to application data?
I don't have a quantitative reason for this feeling[1], but the idea of combining OOP principles - class, object, inheritance - with document markup gives me that feeling.
[1] I'd need to think about it for a second, but I am pretty sure that the root of this dread is the potential of a deep, deep pit-trap, where a class system runs parallel - but discrete - to the inherent semantics of HTML. But I'm not a big fancy-pants programmer. I'm sure my gut feelings can be safely discounted if this idea truly has some legs. I dunno. I like HTMX fine, but that's a different kettle of fish, isn't it? It's not got the same underlying notion of reification like OOP does. It's like the difference between a car with an automatic transmission option versus a car that has modular functionality that toggles whether or not a transmission is a thing or not, which may contain the quality of "automatic".
Meanwhile, I am happy to put up a quick post regarding the thinking over here. I might have done a bit of that in the introductory article: https://dev.to/oxharris/revisiting-the-html-problem-space-an...