Rails and Ruby bake in a lot of really nice, ergonomic features for every day programming, not just larger architectural decisions. For instance I am working on a React Native app in my spare time and so much of Javascript seems tedious. Example is dealing with date ranges. Contrived example: import { isWithinInterval, subDays, addDays } from 'date-fns'; const today = new Date(); let range = { start: subDays(today, 1…
Don't make me think, or why I switched to Rails from JavaScript SPAs
331–340 of 490 posts
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#332Earlier quoted context omitted.
Yes, RedwoodJS seems like Rails for JavaScript. Recently I’ve also been impressed with Remix that was mentioned in the article. It seems to have solved the client server code duplication problem while still offering the benefits of both.
Without knowing if it's possible, I really want to see a RedwoodJS w/ Remix proof-of-concept.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#333Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#334Google searches for React and node.js exceed searches for Ruby on Rails by 100% and 50%, respectively [1]. Some people have used this to argue that React/node are more popular than Rails. But I wonder if perhaps this discrepancy appears in Google Trends because it takes more google searches to accomplish the same thing in React/node versus Rails. I feel the Rails ethos of "convention over configuration" allows me to…
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#335Google searches for React and node.js exceed searches for Ruby on Rails by 100% and 50%, respectively [1]. Some people have used this to argue that React/node are more popular than Rails. But I wonder if perhaps this discrepancy appears in Google Trends because it takes more google searches to accomplish the same thing in React/node versus Rails. I feel the Rails ethos of "convention over configuration" allows me to…
As someone who came from other MVC frameworks outside of Ruby, learning Rails has been a cluster-f of searching through documentation circa 2013. The whole rails “convention over configuration makes it easier” is a load of bologna, because the only way to know the “convention” is to either have gone to a rails boot camp, reading the docs top to bottom, or maybe watching rails casts. The best way to work on rails is t…
I'm appalled everything I realize most developers don't actually read docs... It's unbelievable. Do we expect things to work the way each of us imagine? Or what do one expect when starts using something without reading the documentation?
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#336Earlier quoted context omitted.
Saying that mixins and callbacks are always incomprehensible is silly. They're just a way to pack up code and they can work beautifully. If you don't wanna use them you're gonna have to write the logic in some alternative way, so a bunch of service objects I guess? Does that automatically make code comprehensible - the fact it's using many small classes? I'm sure people can and are writing shitty services as well.
There’s nothing more frustrating than debugging some ruby module with 10 different mixins defining functions with generic ungreppable names like “user”. Then it turns out the mixins have mixins. The common refrain is well, don’t write shitty code then, but all code starts off looking good to the person who wrote it. I guarantee if you have 400 engineers working on a Rails app it will end up in this state because it (…
Look what you're describing can happen, it's just not that often or is the norm. It's usually some crappy legacy project no one wants to upgrade or touch that reaches such a state, there's absolutely no reason why what you described can't be refactored. The fact it isn't being refactored tells you more about the company/teams working on it than about the framework.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#337If you can easily switch to a framework like Rails from a SPA, it's probably a sign your app shouldn't have been a SPA. There's too much "defaultism" in our industry.
Agree, unless your UI is very interactive and complex e.g. a photography editing app then you can likely go without an SPA Your designer might be pissed, but your customers probably don't care all that much and your CEO is going to be pleased at the speed, stability and simplicity of what you've created.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#338What I've gathered, over the years, is that the people who dislike Rails because it makes a lot of decisions for them think they're just too cool for that. It insults their programming ability. OK, I can see that. So, go ahead; have it your way. But while you're still writing thousands of lines of boilerplate in both the front and back ends, and getting your types sorted out, I'm done with my app, and moving on to th…
Please give me code I can understand-by-reading and not code I have to understand-by-synthesizing-with-a-non-collocated-knowledge-set.
This is why the “worse” of golang is better than the “better” of rails
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#339Earlier quoted context omitted.
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.
As the other commentator pointed out there are a few options that do have a complete setup. NextJS, SailsJS, and Gatsby to name a few.
Re: Don't make me think, or why I switched to Rails from JavaScript SPAs
#340Earlier quoted context omitted.
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.