Live data from Hacker News

Don't make me think, or why I switched to Rails from JavaScript SPAs

reviewbunny.app

1–10 of 490 posts

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#4
I 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 modeled after Spring Boot for TypeScript + Node:

https://nestjs.com/

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

#5
I started my career with Rails, then some frontend, and now work a full-time job in Node. Agree with most or all of these points - full-stack javascript is kind of a mess and hasn't really progressed despite individual tools having done so. I think https://sailsjs.com set out to solve a lot of these issues many years ago, by trying to be a JavaScript version of Rails. I'm not sure if they ever reached "feature-parity" though.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#6
post #2

I 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.

As the commenters pointed out, Express.js doesn't try to solve the same problems as Rails. Trying to use one for the other's use case doesn't make any sense.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#7
I think the author went too deep into details here, as this crowd is full of people who are going to be able to rip pieces of this article to shreds. But doing so both misses the larger point and in the process proves it - Rails gave them a set of answers that are good enough so they don't need to delve deeper and can just focus on their app.

Rails 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

#8
I think the author is trying to compare what it takes to create an MVP web-app with all modern features versus creating it in the JS ecosystem.

Also, 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

#9
post #4

I 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…

I should've been more clearer. This post isn't comparing Rails to any framework out there.

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

#10
post #4

I 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…

I can't help but think it is a reflection of the JS ecosystem that I assumed you had misspelled Next.js
Post reply on HN