Why would you use “Ruby on Rails” for a new React project?(forum.shakacode.com)
forum.shakacode.com
Why would you use “Ruby on Rails” for a new React project?
https://forum.shakacode.com/t/why-would-you-use-react-on-rails-for-a-new-react-project/787/8
11 comments
Why compare rails to PHP and node for server costs? They are all similar. If you care about server costs you use Java or Scala or something with actual performance...
Java, and to a lesser degree Scala, would be an eye-brow raising choice for a startup. That's why I didn't bring them up. However, it's worth pointing out
1) PHP and Node both tend to get significantly better performance than Rails. Either is more than sufficient for free products. See: Facebook, WordPress.com, Medium, etc...
2) Java does well in numerical processing, but it isn't necessarily more performant than node or PHP as a web server and it's a bit of a memory hog. Keep in mind Paypal realized huge gains from rewriting large parts of its Java back-end into Node a few years back. Ditto for Groupon.
3) If you're really worried about web server performance, you're probably better off going with Erlang/Elixirm, a JVM language or Go. If you have something truly massive (e.g. Google/FB/Amazon), then you'll probably hire teams to write infrastructure code in C++. Doing that for a normal web app would be nuts.
1) PHP and Node both tend to get significantly better performance than Rails. Either is more than sufficient for free products. See: Facebook, WordPress.com, Medium, etc...
2) Java does well in numerical processing, but it isn't necessarily more performant than node or PHP as a web server and it's a bit of a memory hog. Keep in mind Paypal realized huge gains from rewriting large parts of its Java back-end into Node a few years back. Ditto for Groupon.
3) If you're really worried about web server performance, you're probably better off going with Erlang/Elixirm, a JVM language or Go. If you have something truly massive (e.g. Google/FB/Amazon), then you'll probably hire teams to write infrastructure code in C++. Doing that for a normal web app would be nuts.
Very informative. Thank you.
Ruby is alive and well. A beautifully written language with an incredible community. Rails only gets stronger and you can look at Shopify for just one example of very large production rails apps. How about Gitlab? There are many more.
It's a quick and easy way to iterate a design while getting out of the way. React can just talk to a rails API and boom you're building the MVP with a simple rails new command. One command to generate models. It's just fucking beautiful. And not bloat like node, rack is a few thousand lines. Idk I'm not an expert but it's just a great platform, why the fuck should anyone not use it? Plenty of reasons exist but it's the right tool for a set of jobs.
It's a quick and easy way to iterate a design while getting out of the way. React can just talk to a rails API and boom you're building the MVP with a simple rails new command. One command to generate models. It's just fucking beautiful. And not bloat like node, rack is a few thousand lines. Idk I'm not an expert but it's just a great platform, why the fuck should anyone not use it? Plenty of reasons exist but it's the right tool for a set of jobs.
>A beautifully written language with an incredible community.
This is what has always killed me about Ruby. Such a wonderful language, community, and tooling held back by a painfully slow and inefficient runtime.
This is what has always killed me about Ruby. Such a wonderful language, community, and tooling held back by a painfully slow and inefficient runtime.
I am hoping TruffleRuby, which is looking more like a drop in replacement for MRI Ruby, would solve all these problem.
It will still uses LOT of memory, but memory for most is cheap these days. Even it it uses double the memory of MRI and gain 10x the processing performance it is still a net 5x win.
It will still uses LOT of memory, but memory for most is cheap these days. Even it it uses double the memory of MRI and gain 10x the processing performance it is still a net 5x win.
> tooling held back by a painfully slow and inefficient runtime.
I really hope that mruby or crystal will solve that problem.
I really hope that mruby or crystal will solve that problem.
Gitlab also uses an insanely high amount of RAM. They currently recommend 4gb of ram. I have seen many other times where Rails apps use a stupid amount of RAM.
[deleted]
For any kind of site where you're selling a service or product and for the vast majority of freemium models, Rails is great. You'll have to scale a bit sooner than if you chose something like PHP, Node or Go, but you'll have plenty of revenue to pay for it. You'll also either get to profitability or to the point where you realize your experiment is a failure a lot faster.
I wouldn't use Rails if I were working on something really simple or if my plan were to monetize off of ad revenue and a huge base of free users.