4 ms·
This. I've long ago abandoned spaghetti mega-scripts and SPAs in favor of targeted JS libraries that extend HTML capabilities. They're not web components, they
by gambler 6y ago
This.
I've long ago abandoned spaghetti mega-scripts and SPAs in favor of targeted JS libraries that extend HTML capabilities. They're not web components, they don't require some framework to manage, and my HTML works fine without them, but if I load the library and add certain attributes or tags to my markup, I get extra capabilities. The libraries don't require crazy tooling to manage, don't have extensive dependencies and so they facilitate steady incremental development.
I'm very happy with this approach and I'm reusing code I've written years ago for completely different projects.
- zeugmasyllepsis 6y ago> .. in favor of targeted JS libraries that extend HTML capabilities. Do you mean libraries like Turbolinks[1] and/or Intercooler[2] here? I'm interested in what libraries you use, and others like these which help "bridge the gap" between traditional and single-page sites. [1] https://github.com/turbolinks/turbolinks https://github.com/turbolinks/turbolinks [2] https://intercoolerjs.org/ https://intercoolerjs.org/
- bradstewart 6y agoTurbolinks and Stimulus are two tools I find quite useful. Yes, I like Rails and the way Rails does things.
- gambler 6y agoYes, those are some of the examples. You can roll your own as well. With modern JS and CSS selectors you can create useful, reusable libraries with just several dozen lines of straightforward code.
- gunnarmorling 6y agoUnpoly [1] is another one in that camp. Made good experiences with to smoothen page transitions in a server-side rendered app [2]. I find this model much more approachable for backend devs than going all-in on SPA. It doesn't help of course with more fine-grained interactions like say in-place editing in a table. [1] https://unpoly.com/ https://unpoly.com/ [2] https://www.morling.dev/blog/quarkus-qute-test-ride/ https://www.morling.dev/blog/quarkus-qute-test-ride/