Don't make me think, or why I switched to Rails from JavaScript SPAs
1–10 of 490 posts
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#2Barely any convention, lots of repetition and configuration - all things Rails specifically set out to solve.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#3Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#4This comparison isn't a good one. Rails is an all-encompasing framework.
If you compare Rails to something like Nest.js, there's not much you're missing. Nest is one of the best application frameworks I've used in any language, and it comes with all this stuff you say JS doesn't have.
---
EDIT: To clarify (because it is confusingly named), NestJS is a framework modeled after Spring Boot for TypeScript + Node:
Not to be confused with Next.js, which is a framework for building SSR React apps.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#5Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#6I mostly work in Rails, but when I have to hop into a node project, it feels like I'm stepping back into PHP in terms of sheer madness. Barely any convention, lots of repetition and configuration - all things Rails specifically set out to solve.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#7Rails is not the only choice that does so. And people with broader skill sets can assemble their own solutions and might not want that anyway. But this author just wanted to pick a platform and move on, and yep, Rails works for that.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#8Also, Rails is well known to have Convention over Configuration. That helps to set up and maintain a project since everybody has to follow the same pattern. The cons is that you lose flexibility from the architecture perspective. But in Rails, you have ways to overcome that easily.
I think Rails lost popularity when the front-end JS framework movement started. Rails didn't have a response to that; people had to create the Rails app, remove the Views and use a JS framework to create the one-page app experience.
Now, if you are already spending that much time using JS for the front-end, why not use JS for the backend? But then things got too complex in the JS due to the lack of conventions.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#9I used to write Rails professionally for many years This comparison isn't a good one. Rails is an all-encompasing framework. If you compare Rails to something like Nest.js, there's not much you're missing. Nest is one of the best application frameworks I've used in any language, and it comes with all this stuff you say JS doesn't have. --- EDIT: To clarify (because it is confusingly named), NestJS is a framework mode…
What I was trying to say is that Rails got a lot of things right and it's making me productive, because I don't have to make the same decisions over and over again when making a JS app. Rails made those decisions for me and the only thing left for me is to build my app.
I myself like Next.js and Remix a lot, but they still leave you to spend time making basic decisions, like how to organize your project or how to implement background jobs.
That's why I'd love to see more conventions and less configuration in the JS land.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#10I used to write Rails professionally for many years This comparison isn't a good one. Rails is an all-encompasing framework. If you compare Rails to something like Nest.js, there's not much you're missing. Nest is one of the best application frameworks I've used in any language, and it comes with all this stuff you say JS doesn't have. --- EDIT: To clarify (because it is confusingly named), NestJS is a framework mode…