Earlier quoted context omitted.
Is there anyway to use turbolinks with a java backend? Or is it only specific to rails?
You can. Here's a blog post from somebody who uses it with an Elixir backend. https://changelog.com/posts/why-we-chose-turbolinks
Stimulus: A modest JavaScript framework for the HTML you already have
51–60 of 65 posts
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#52Earlier quoted context omitted.
30KB? That's a lot, this is not minified and Gzip'ed is it?
Well, I just opened the script in firefox and checked the network tab in the dev console. It's 26KB gzip and 31KB after decompression. Which, IMO isn't too bad, I keep my pages under 100KB. If I throw out a picture for an older project, I can easily get back those 30KB to stay under 100KB.
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#53As a VanilaJS advocate, I love it. The manual even describes how to use just a plain inclusion, instead of the build tool of the day.
But...tons of the nontrivial JavaScript projects I use describes a plain inclusion. So I don't quite understand the plaudit here. Doing so is not a great idea , because build tools solve real and extant problems, but they're very common.
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#54I like it a lot, but I'm always afraid that I'll end up running into limitations of the framework if whatever I'm doing happens to grow in scope in a way I hadn't planned for. I tend to be bad at planning ahead for side projects, but who can blame me, they're side projects. Anyway, just stopping by to say that Vue has struck a good balance for me. Peppering in {{template values}} in existing HTML works really well, a…
Have it exactly the same way, and especially the vue components are nice to have. It seems like Stimulus would be a good fit for small applications, but as soon it becomes a medium size project it would be to complex to maintain.
They didn't just "invent" the library in hopes it would work for someone. It's what they run in production on one of the most long running SAAS apps on the internet.
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#55I don't mean to knock the effort they've put in here, but this looks like all of the hand-rolled "frameworks" I saw my friends in the agency / consulting space made when they said angular 1 was "too heavy"... right down to the 'data-controller' attribute binding that everyone seemed to independently come up with. Is there anything actually novel here? These types of things always seemed to run into composition issues…
Isn't the fact that you've seen a bunch of people already hand-roll this a good indication that there's a need for something like this, so no-one else needs to hand-roll it anymore? It doesn't need to be novel right? It just needs to be helpful.
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#56Previous discussion: https://news.ycombinator.com/item?id=16052105 I've been using Stimulus + Turoblinks for my current side project and I love it. Nice and simple way to add a bit of interactivity to existing HTML on your page.
Is there anyway to use turbolinks with a java backend? Or is it only specific to rails?
http://quickenloans.github.io/Behaviors.js/
It has no server-side dependencies and should be easy enough to use. But it doesn't use push history, which limits its usefulness for more extensive use cases.
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#57Earlier quoted context omitted.
30KB? That's a lot, this is not minified and Gzip'ed is it?
Well, I just opened the script in firefox and checked the network tab in the dev console. It's 26KB gzip and 31KB after decompression. Which, IMO isn't too bad, I keep my pages under 100KB. If I throw out a picture for an older project, I can easily get back those 30KB to stay under 100KB.
Yeah so no. There is no way gzip could only compress 16% of utf8 data.
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#58Earlier quoted context omitted.
I love Vue as well. The problem is that I haven’t found a good way to fit Vue in with an existing Rails app without it resorting to JavaScript hell. Stimulus looks interesting because it already fits in with Turbolinks.
When you say JS hell I'm assuming you mean because Rails wants to be your JS bundler? Why not just have rails output a div with an ID? And then use a separate bundler such as webpack to generate a JS bundle? At the end of the day Vue-cli or create-react-app ultimately just generates static assets. Adding your statically built SPA into a Rails app should be no harder than adding jQuery. Rails should not need to know a…
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#59I don't mean to knock the effort they've put in here, but this looks like all of the hand-rolled "frameworks" I saw my friends in the agency / consulting space made when they said angular 1 was "too heavy"... right down to the 'data-controller' attribute binding that everyone seemed to independently come up with. Is there anything actually novel here? These types of things always seemed to run into composition issues…
Re: Stimulus: A modest JavaScript framework for the HTML you already have
#60Previous discussion: https://news.ycombinator.com/item?id=16052105 I've been using Stimulus + Turoblinks for my current side project and I love it. Nice and simple way to add a bit of interactivity to existing HTML on your page.
Is there anyway to use turbolinks with a java backend? Or is it only specific to rails?
Turbolinks also makes websites appear extremely slow when on slow connections. It's much more frustrating to sit there with a loading bar hovering at 20-30% than to see a spinner.