4 ms·
> don't use tools that introduce proprietary syntax to inject janky control structure and looping logic And StimulusJS doesn't? <div data-controller="modal
by troupo 3y ago
> don't use tools that introduce proprietary syntax to inject janky control structure and looping logic
And StimulusJS doesn't?
<div data-controller="modal"
data-action="keydown.esc->modal#close" tabindex="0">
</div>
<div data-controller="content-loader"
data-content-loader-url-value="/messages.html"
data-content-loader-refresh-interval-value="5000"></div>
Zealots cannot recognize a custom nonstandard poorly specified DSL even if stares them right in the face
- peteforde 3y agoWait, do you mean this custom nonstandard poorly specified DSL? https://html.spec.whatwg.org/multipage/dom.html#attr-data- https://html.spec.whatwg.org/multipage/dom.html#attr-data-* What you're showing above is 100% standards HTML 5. Data attributes have been a thing since 2008 or perhaps slightly earlier. You might not love the look of it, but the markup above is something that your browser understands without interpretation. You can turn off JS and it will render without any issue whatsoever. https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data- https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...* This is very different from tooling that uses alternative, non-HTML syntax. Our browsers might be written to be absurdly tolerant of broken markup, but that doesn't mean that Vue/HTMX/Alpine/CFML templates aren't proprietary.
- arcanemachiner 3y agoFWIW I'm pretty sure Alpine can be configured to require `data-` as a prefix for its tags, e.g. `data-x-click="handleClick"`.
- troupo 3y ago> What you're showing above is 100% standards HTML 5. Data attributes have been a thing since 2008 or perhaps slightly earlier. So, which part of these is standardized and non-custom: keydown.esc->modal#close content-loader-url-value content-loader-refresh-interval-value > This is very different from tooling that uses alternative, non-HTML syntax. Ah yes. Pure HTML syntax of `keydown.esc->modal#close`
- peteforde 3y agoYou appear to be confused. If you look in the specification I linked to, what you're hung up on is known as a "value". It can be any valid characters required by your application.
- troupo 3y ago> You appear to be confused. If you look in the specification I linked to, what you're hung up on is known as a "value". Of course I'm not confused. You're hung up on the little insignificant part that `x="y"` is a HTML attribute and pretend that this immediately makes it standart non-weird DSL. Funnily enough you share this with proponents of some other frameworks like lit. "But we use HTML attributes here's an MDN link" > It can be any valid characters required by your application. Indeed. So let's look at those characters, shall we. First it's the literal "proprietary syntax to inject janky control structure" that you complain about. Funily enough you're ignoring this when I'm pointing it out: click->gallery#next keydown.ctrl+a->listbox#selectAll resize@window->gallery#layout click->gallery#open:capture scroll->gallery#layout:!passive Second, you have a literal custom DSL composed of data-attributes. # Passing params to events data-[controller-name]-[param-name]-param # "Targets". All elements will be put into an array in [field-name] data-[controller-name]-target="[field-name]" # "Outlets" because you need a different name for references # to instances of other classes data-[controller-name]-[field-name]-outlet # Data binding. Much like Vue, it requires a specific # structure of values present in your code data-[controller-name]-[value-name]-value # An additional data binding for CSS classes # that are also specified separately data-[controller-name]-[css-class-name]-value But zealots are completely blind to the fact that they also have a non-standard badly specified hacky DSL because "but we use HTML attributes".
- peteforde 3y agoYou can say this as many times as you want, but you're factually incorrect and conceptually misguided. HTML attributes were literally created to do the exact thing that you seem to think is a smoking gun.