DEV Community

loading...

Discussion on: Live previews with Rails and StimulusReflex

Collapse
drews256 profile image
Andrew Stuntz

While I agree that SR and CR are much more powerful than Turbo. I think comparing them is like comparing Apples and Oranges. It bugs me that so many folks are trying to compare the two when CR and SR are just different solutions in this same problem space. I don't think people should be trying to pick between SR and Turbo, they should be evaluating how they want to build an application and what they want to support and choosing the appropriate tool. They don't need to be competitors.

Collapse
leastbad profile image
leastbad Author

I think (?) we agree in spirit. We see Turbo Drive as the successor to UJS and, like UJS, we go out of our way to recommend that developers at least consider whether their needs can be addressed by those built-in tools.

The problem is the DHH himself positions Turbo as a superior alternative to SR, so we're stuck tackling FUD scenarios on a 1:1 basis where people are attempting to use the built-in tool to solve extremely complex UI scenarios for which SR/CR is designed for - and they are doing it because someone they trust made it.

If Turbo Drive had been released by an unknown developer, people would not be setting aside vastly simpler and more powerful tools to use it. Adding routes and keeping track of dozens or hundreds of "frames" is not, with any objective distance, a positive.

Collapse
drews256 profile image
Andrew Stuntz

Turbo Drive as the successor to UJS and, like UJS, we go out of our way to recommend that developers at least consider whether their needs can be addressed by those built-in tools.

Turbo is not even really "baked" in yet. My efforts to use Turbo in a few Rails apps I work on have gone really poorly. I'm super unimpressed. As a "add-on" for applications already in development Turbo (imo) sucks. It's impossible to make things "work" without rewriting a bunch of work that already exists.

Either way, I hear you. I wish DHH would be more on board with "other" solutions that are not his own. I hear him when he doesn't really wanna change the way "the internet works" with websockets doing funky things and dom diffing etc. But, SR/CR is powerful in so many different ways than Turbo.

Thread Thread
leastbad profile image
leastbad Author

Don't doubt for a moment: Hotwire and to a lesser extent Kredis are the marquee features of Rails 7. I don't know if you've noticed like we have but he responds to critiques with "still in beta" and when people ask if it's going to have major updates before Rails 7, he says "beta is just a word".

All I know is that if we don't stand up for and tell people about this thing we love (and have invested, cumulatively, thousands of hours into, for free) then nobody is going to do it for us - even if DHH didn't have a bad case of Not Invented Here syndrome.

Thanks for the thought provoking convo! I hope you can forgive a certain degree of parental pride in what we've created.

Thread Thread
drews256 profile image
Andrew Stuntz

Yeah, I know. I'm trying to be excited about it haha. I think it's fine. I really like Stimulus and I'm very excited to see the mobile "hotness" that is supposedly going to come out of Turbo. But I just know it's gonna pigeon hole me into writing and app in the same way that DHH would write it. While I don't think that is a bad thing, I don't think it's a good thing either.

I don't think you have enough parental pride! I'm using and generally loving every minute of working on an app with SR around. It's quite nice.

Thread Thread
leastbad profile image
leastbad Author

Flattery will get you everywhere!

We were saying yesterday that the biggest gift that Hotwire gives us is the assumption that Stimulus will be available by default. I don't think this gets nearly as much attention as it deserves - because it's freaking awesome.