4 ms·
Just want to add my two cents: I've had really great experiences using Hotwire and rails 7 in general. The developer experience is really good and it's a fanta
by andrewmutz 3y ago
Just want to add my two cents: I've had really great experiences using Hotwire and rails 7 in general. The developer experience is really good and it's a fantastic toolset for building middle-complexity user experiences. You can build surprisingly sophisticated web experiences with a small amount of code and simple mental models.
- x0x0 3y agoSame. If you haven't tried it, you can basically annotate your html with tagged areas, use your normal server-side rendering, and do in-place replacements / edits / updates with your normal server-side rendered pages. It's very railsy, and I mean that in the best way. I wouldn't use it for the most demanding client-side interactive experiences, but for most use cases, it's close-to-react level interactivity for maybe 10% of the dev time.
- brainbag 3y agoI've done and loved at least 15 years of Rails, but not since the new Hotwire/Turbo/Stimulus releases. I've played with it a bit in side projects and it seems interesting, though I'm still skeptical that it's a good model for apps that plan to stick around for a while. One of the things I've found difficult coming back to Rails is how spread out all of the behavior is in so many different files and partials and helpers. While SPAs have a lot of trade-off, organizing related code into components works so much better than any experience I had with server-side MVC, especially when using something like TypeScript and Remix's islands that very effectively isolate even further into logical modules. What little I've done with Hotwire/Turbo made it seem like very basic behavior is even more spread out and even harder to reason about for someone who didn't write it, which seems like it would make maintenance and refactoring in Rails even more time-consuming and perilous than it already is. I'm really interested in the technology because I hear such glowing reviews of it, but I'm not sure I see it. I'd love to see a non-dogmatic comparison of SPAs vs Rails with Hotwire/Turbo MPA for post-MVP longer-term projects.
- wmidwestranger 3y agoYou hereby have permission to organize code as you would like! I think your complaint is fair but I'm not sure it is a fault with Rails so much as I've rarely seen anyone interested in organizing their Rails code more than the default. Personally, I think it is really helpful, especially when it's as easy as using modules or having interfaces between modules. If you want feature-based structure, I'm pretty sure you can do it but that'll be a bit more involved. There are some gems out there that support those efforts. I've found with Stimulus/Hotwire/Turbo that separation of concerns and finely composed partials can help a lot.