Live data from Hacker News

Stimulus: A modest JavaScript framework for the HTML you already have

github.com

101–110 of 112 posts

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#101
post #87
post #70

Earlier quoted context omitted.

its not "cool" anymore, but I always thought knockout was pretty simple, worked well, and fulfilled a lot of this use-case. I built a couple knockout based apps that worked phenomenally well across lots of platforms, and were pretty lightweight dependency wise. Organization and convention was paramount to keep consistent since it doesn't enforce a bunch of best practices like a larger framework would; but, looks like…

I'm one of the knockout core developers. Just a heads up, knockout 3.5 just went into beta, and 4.0 is in alpha. I spoke the other day with another core developer, Ryan Niemeyer, and he noted that ko is still a good fit for quick and lightweight dynamics, but with good conventions a solid foundation for really complex Web apps. It's still very solid, and the API largely unchanged since IE6 was around. Tko, the monore…

Very cool; I'm super glad to hear its still going strong.

My last full stack project where I touched the front-end was 100% knockout + some custom routing + commonjs module organization, and I still have fond memories of it relative to most other front-end experiences pre-2014.

re router: I think having an option for a built in 1st class router would be nice. My hacked up quick ~75 line solution was essentially just using the dom as an event bus with custom (consistent) payloads to control state change/ notifications/etc... works great for small stuff, but would probably break down in a huge application.

If I get back to the front-end any time soon, I'll definitely be looking back at ko.

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#102
post #25

I think this, along with its sibling Turbolinks [1], is filling a much needed gap with regards to complexity in these javascript frameworks. Myself, I've been playing with intercoolerjs [2] for a few weeks, and it is quite refreshing. These are great libraries for small full-stack teams who do not want to get lost in the complexity of front-end stuff like react, webpack, etc. [1] - https://github.com/turbolinks/turbo…

Wonderful prior discussion on intercoolerjs, albeit a bit old:

https://news.ycombinator.com/item?id=12885980

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#103
post #98

Earlier quoted context omitted.

Turbolinks is often a terrible user experience. The user doesn't measure page load in seconds, but in the perceived load in seconds. Turbolinks on slow connections feels painful, including on big sites with fast servers, like YouTube and Github.

Can you define what do you mean by slow connection?

I often work at cafes. Sometimes the connections are slow. I sometimes middle-click the links open (new tab) to avoid having to wait for turbolinks.

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#104
post #98

Earlier quoted context omitted.

Can you define what do you mean by slow connection?

I often work at cafes. Sometimes the connections are slow. I sometimes middle-click the links open (new tab) to avoid having to wait for turbolinks.

You know you'll wait the same amount of time, right?

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#105

Earlier quoted context omitted.

Turbolinks are not good for usability. They appear to make the pages painfully slow on slower connections. They add a loading bar across the top which can have different meanings depending on the site and browser: - some browsers add a bar across the top to indicate page loading progress (example: Firefox for Android) - some websites add a bar across the top to indicate how far you've read in an article - turbolinks…

I guess that Turbolinks is used by Basecamp 2 and it sucks a lot. Search takes seconds to load for me, without any loading feedback.

Turbolinks is also used by Basecamp 3, I assure you.

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#106

As a Rails dev, I find this very interesting. I've already jumped on the Vue bandwagon and have had a pretty good time using it. That being said, I recently started a new small-ish Rails project and loaded Vue in via 5.1's Webpack integration...and ended up just hacking together some jQuery stuff for minor front-end dynamism. It just was easier/faster for me to do that in this particular context. However, I could def…

Speaking of rails and Vue, how do you manage authentication? Can you point me to an example of a Vue-powered page in a larger rails app consumes json data after authentication?

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#107
post #99

Earlier quoted context omitted.

I am really liking intercoolerjs and noticing that Stimulus will not work with IE11 which I need to support. What is the browser support for intercoolerjs?

> noticing that Stimulus will not work with IE11 which I need to support See: https://github.com/stimulusjs/stimulus/blob/master/INSTALLIN...

Thank you

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#108

So... knockout?

I said the same thing and noticed you had said it 4 hours earlier. Whatever happened to knockout? If it failed, why?

My company still actively uses it in production and development

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#109

Earlier quoted context omitted.

If you enjoy working with intercooler.js but are looking for a bit more power, check out Unpoly [1]. [1]: https://unpoly.com

Thanks for the heads up. I've worked with Intercooler before and while it is a really nice framework, I've always felt it was missing a few critical things. Unpoly looks cool. Do you know if it has a dependency on jQuery still, like Intercooler does? Or does it run independently?

Hello, I've been watching intercoolerjs also, and thinking of using it in a future project. What are the few critical things missing have you experienced ?

Re: Stimulus: A modest JavaScript framework for the HTML you already have

#110
post #58

I don't understand the example. How does: // hello_controller.js import { Controller } from "stimulus" export default class extends Controller { greet() { console.log(`Hello, ${this.name}!`) } get name() { return this.targets.find("name").value } } get connected to the element? I would expect something like `stimulus.register("hello", HelloController)`...

yes, I had that question when I first read it - it's not obvious enough.
Post reply on HN