Live data from Hacker News

StimulusReflex, or LiveView for Rails

docs.stimulusreflex.com

61–70 of 93 posts

Re: StimulusReflex, or LiveView for Rails

#61

Wish I had the time to really study Phoenix's LiveView and implement the same in Java. AFAIK there's no equivalent for this in Java and I mean the same not kinda-the-same but not really like Vaadin or God forbid GWT.

Good luck. Liveview depends strongly on features of the erlang VM that you won't get right without a deeper understanding of erlang (how do you clean up a websocket connection when the actor exits early, say due to throwing an exception - that's zero lines of code in lv), you're probably better of taking inspiration and writing it from scratch.

Re: StimulusReflex, or LiveView for Rails

#62
post #36

It's worth pointing out that the Phoenix Web Framework (which LiveView is built on) came into being because the creator Chris McCord tried to build something like LiveView in Ruby and eventually ran into fundamental limitations due to how concurrency was handled. He looked around, discovered Elixir and the rest is history. I'm very interested to learn what has changed since then that made this possible, or made it wo…

There's a project called AnyCable which replaces ActionCable to give Rails the real-time performance equivalent of LiveView. See this https://evilmartians.com/chronicles/anycable-actioncable-on-... Looks like having 20,000 idle clients connected to a server sits at only 380MB and Erlang is at 737MB.

I've had good success with AnyCable

Re: StimulusReflex, or LiveView for Rails

#63
post #45

I love that Rails continues to evolve. I've invested so much time in it that it's good to know that Rails is still a viable choice for modern work. If someone's creating new cool stuff like this, then I'm not the only one.

I feel the same. I'm invested and I actually like developing on it (biased of course). I don't see any reason to worry about Rails jobs disappearing, Rails is here to stay. It's soon turning 20 forchrissake!

Re: StimulusReflex, or LiveView for Rails

#64
post #37

Does python have anything like this?

This comment I have just made applies equally to Python as to Ruby I think: https://news.ycombinator.com/item?id=25791181

What’s the missing feature? Native M:N green threads? Seems to me that Python’s async is a fair bit more mature than Ruby, so the comparison here is not obvious to me.

Re: StimulusReflex, or LiveView for Rails

#65
post #43

Earlier quoted context omitted.

Here comes the classic HN middle-brow dismissal :) TodoMVC is meant to be a minimalist demo, not a battle-hardened app. We switched from React to Reflex 7 months ago. We have fewer bugs than we did with React, and we ship things about 3 times faster. 5/5 of us strongly prefer Reflex over React. Including one of us who was a big React aficionado beforehand. Just wanted to put that out there for anyone considering Refl…

That may be fair :) Personally, I enjoy React on the front-end but don't currently like any back-end framework, so Reflux may well be better in aggregate. (FWIW, I have a PhD in computer science and big part of that was on web applications and frameworks for them, combined with ~15 years commercial experience mastering web development, so this wasn't meant to be a middle-brow dismissal. As I said, it is exciting, I'm…

My experience bears this out as well. Things that "just work" usually don't do that and/or come with a list of significant caveats.

Re: StimulusReflex, or LiveView for Rails

#66
post #29

I can imagine this simplifying the development of B2B SaaS tools that are primarily about presenting and interacting with data. The bit about broadcasting to a large number of clients is harder to see the value of in a Rails application when so many approaches work simply enough already. As for replacing rich frontend rendering libraries in more complex apps - it seems dicey. Part of the virtue of React is that it si…

was looking for this sort of comment to confirm my bias. I'm trying to figure out what is it about how I feel about reflex: the idea that even with this you still have to reach for js libs or am I just being lazy. I guess a little bit of both maybe.

But it's true, even though our app is pretty straight forward crud, we still need things like autocomplete, drag and drop, tabs, modals, form validation etc. Just having js being js and ruby being ruby seems easier for me to parse and work with.

Re: StimulusReflex, or LiveView for Rails

#67
post #43

In many ways, this is very cool. But, I have to admit, I don't love it. I would love to have an integrated environment where client/server doesn't matter, but I don't think this gets far enough. Working in a spread of html.erb with special tags plus some Javascript doesn't feel great to me compared to React. I like their TodoMVC app, since that gives a simple, minimal starting point. Getting persistence in that few l…

Here comes the classic HN middle-brow dismissal :) TodoMVC is meant to be a minimalist demo, not a battle-hardened app. We switched from React to Reflex 7 months ago. We have fewer bugs than we did with React, and we ship things about 3 times faster. 5/5 of us strongly prefer Reflex over React. Including one of us who was a big React aficionado beforehand. Just wanted to put that out there for anyone considering Refl…

I love hearing this story! I'm not in the job market since I love where I work at the moment (though don't love our tech stack) but I'm really hoping to find something, preferably using LiveView, for my next move. It's really nice to hear about companies having success with this kind of tech! It's the first tech I've been really excited about since learning Rails eight years ago (which was far too late!)

Re: StimulusReflex, or LiveView for Rails

#68
post #64
post #37

Earlier quoted context omitted.

This comment I have just made applies equally to Python as to Ruby I think: https://news.ycombinator.com/item?id=25791181

What’s the missing feature? Native M:N green threads? Seems to me that Python’s async is a fair bit more mature than Ruby, so the comparison here is not obvious to me.

The conclusion I have come to is that the way you interact with the concurrency model is just as important as what the model is underneath. Erlang (and Elixir) have got both levels right - M:N scheduling underneath, and the actor model (with excellent library support) on top to best take advantage of it.

Re: StimulusReflex, or LiveView for Rails

#69

To me, this looks like one of the few real ways out of the madness that is modern frontend development. Excited to see the approach gaining adoption!

I don’t think this holds up anymore. Tooling has come so far. I have never in my life been as productive as I am inside of a Vue/Tailwind code base at this point. One of my clients is a fairly vanilla Rails 4 app (which is arguably a friendly place to be - although slow) and it’s not even close. I miss Vue and having a full “app” environment on the front-end side constantly. Jumping back and forth between these proje…

> I have never in my life been as productive as I am inside of a Vue/Tailwind code base at this point.

For what kind of app? Crud, frontend to a SaaS, something else?

I am still finding form-heavy apps needing frontend+backend form validation to be faster to write entirely server-side. Which is painful as more and more I have field types that are best off as JS widgets, and enhancing server-rendered forms is a pain.

Re: StimulusReflex, or LiveView for Rails

#70

Earlier quoted context omitted.

I don’t think this holds up anymore. Tooling has come so far. I have never in my life been as productive as I am inside of a Vue/Tailwind code base at this point. One of my clients is a fairly vanilla Rails 4 app (which is arguably a friendly place to be - although slow) and it’s not even close. I miss Vue and having a full “app” environment on the front-end side constantly. Jumping back and forth between these proje…

I agree with you, but it took a long, long time to get that good and comfortable with react (in my case) years actually since I don't only do frontend. For people who haven't already climbed that mountain and learned a new "language" I agree with GP. This could be a game changer. My only regret is that for a while now JavaScript had basically been the standard. As good a development as I think this is, it will really…

The JavaScript framework era always felt like a bandaid while we figure out something better. I’m convinced liveview is the future.
Post reply on HN