Live data from Hacker News

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

reviewbunny.app

71–80 of 490 posts

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

#73

Earlier quoted context omitted.

The point here is that you do not have to think about choices, there is a "rails way" for every problem. There is no such thing as "the node way". They are hundreds of ways, some of them are dead ends.

> There is no such thing as "the node way". And thank fucking god for that. It turns out there's no such thing as "The one way" - it's a choice for a reason: It has consequences and trade-offs that are applicable to your goals. If it turns out your goals are a very simple crud app for a team of under 5 - Rails is probably a great choice. For most everything else, you should probably understand why Rails made the choi…

> And thank fucking god for that. It turns out there's no such thing as "The one way" - it's a choice for a reason: It has consequences and trade-offs that are applicable to your goals.

That comes with a downside though, which is that for any given problem there won’t necessarily be an ultra-well-supported “happy path” where every conceivable problem has long been documented along with a solution.

To me the lack of happy paths can be a problem. It’s something that is often encountered with Android development because Google can’t make up its mind and it’s very frustrating — usually your choices are between 5 different APIs that suck in different ways, meaning you have to pick the one that sucks in a way you think you can deal with best. It’s a significant damper on both velocity and motivation.

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

#74
It's true that there are many more choices to make for a JS SPA compared to RoR but isn't this just a fixed cost? Pick once and then stick to it. Use the same things for your next project. Done.

I'd venture to guess that for a RoR newbie, it takes just as much time to understand the 'glue' (I've heard people refer to it as 'magic') that makes it all work together behind the scenes.

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

#75

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

The issue I have with the JS world is that the most used libraries and frameworks are just "good enough for a small project" and no more than that. * Javascript has such a minimal standard library, you will need to get one or three third-party libraries to augment its core. * React is an excellent view library and nothing more. You will need to get one or three third-party system to turn it into a fully fledged web f…

> Javascript has such a minimal standard library, you will need to get one or three third-party libraries to augment its core

Maybe 5-10 years ago, there is no need anymore

> React is an excellent view library and nothing more. You will need to get one or three third-party system to turn it into a fully fledged web framework.

Depends on your needs. Small app? React on its own is enough. Larger app? Add a router. That’s basically it. If you want a centralized state store, you can pick one of those up. It’s really not that difficult.

> Frameworks like Next.js are good enough to create a static page, but as requirements grow more complex, its limited feature-set and lack of in-depth documentation will feel like a prison

I don’t find any of this to be true.

> Dev tooling is non existent, so it's on you to get and _configure_ a linter, type checker, testing framework, bundler, etc

You mean there is nothing built in to the language itself? Yeah, that’s a feature in this case. We wouldn’t have the amazing 3rd party tooling if it did. The JS tooling ecosystem is amazing and getting things setup nowadays just takes one command.

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

#78

Have any of you tried .NET?

Yeah but this falls into similar territory.

Do you choose ASP.NET MVC? ASP.NET Razor Pages? Blazor? ASP.NET Web API + Angular/React/etc?

I think this article is basically saying "stick to the boring stuff that does what you need out of the box". What is that in .NET land though?

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

#79

Earlier quoted context omitted.

PHP hasn't been madness for a long time. One could argue Laravel (a RoR inspired framework) has become better than RoR.

I mean, there have been plenty of valid arguments against PHP the language and its standard library, but the big issue most people end up having have to do with its ecosystem, developers, and frameworks. My earliest rants about PHP was the sheer volume of bad tutorials; googling for "php sql" or whatever would invariably give you examples susceptible to SQL injection. And the other issue was that everyone was buildin…

If you're actually interested in the subject, a good way to familiarize yourself with the current state of PHP is to run through something like https://laracasts.com/series/laravel-8-from-scratch. It should give you a good idea of the current state of PHP, what educational resources look like, along with a taste of the most popular PHP framework out there.

These conversations always tend to go the same way; someone complains about PHP and then later admits it's based on their experience 5-10+ years ago. PHP has come a long way and is worth checking out if you're into web development.

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

#80

Earlier quoted context omitted.

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.

Yes, but the problem is that there's still nothing in the node ecosystem that's as complete as Rails. Fine, express.js isn't going to do the job. Neither is anything else.

This isn’t really true though, NestJS for example is very opinionated and similar.

The issue is more that Node and JavaScript in general is too popular and there are way more options whereas ruby is rarely used for non rails work.

Post reply on HN