4 ms·
I feel I'm in the same camp as the comment you're responding to, so I do want to chime in. Most of the applications I've had to develop require a database of so
by SnowingXIV 10y ago
I feel I'm in the same camp as the comment you're responding to, so I do want to chime in. Most of the applications I've had to develop require a database of some sort, rails makes this incredibly easy to do. I can simply generate a model and migrate. There are very few applications (that I've needed to develop) that don't require a reliable database. This is where I've yet been able to truly utilize anything like react, vue, etc. The best situations been some form storing json data objects but that's not scalable and I rather be able to backup a sql database to query from (especially with thousands of records). And I know facebook uses it and has one the biggest databases on the planet but I'm talking about easy of use in spinning up full stack applications as a small shop and understand what's going on.
I know you can use react on top of rails (with postgres, mysql, etc), but then I start feeling too many weird abstractions going on and have a hard time following the bouncing ball. React claims to be just the V part of MVC which is fine, but when I'm trying to quickly build up a full stack application rails just felt the simplest way to do so.
Bringing this up not because I think there is anything wrong with React and I know they are solving a pure front end problem, but this is more of a question to what's the most elegant full stack solution that would be comparable to RoR solution with any of these new hot js frameworks? If there is I think I'd be more than happy to startup some projects that way.
- lobster_johnson 10y agoEasy: Write your backend as an API, and let the UI be a thin client that talks to it. You can write your backend in Rails (or Sinatra, which we've used a lot) and use the same workflows to wire up models and so forth. I wouldn't want to write database stuff in JavaScript. The frameworks are all terrible. Nobody has managed to replicate the ActiveRecord story for Node.js. Except for legacy stuff (which use Ruby + Sinatra), we write our backends in Go. But that might not be your cup of tea.