Re:Moving my serverless project to Ruby on Rails
by xwdv on Sunday November 15, 2020 @10:11AM
(#25101759)
All you need is one weekend to really learn a useful amount of Node and React. You can’t spare it?
[ Parent
| on HN ]
Re:Moving my serverless project to Ruby on Rails
by neurostimulant on Sunday November 15, 2020 @10:37AM
(#25101952)
What's the benefit of moving from Rails to Node and React productivity-wise? On the backend side, Rails comes with an ORM, authentication, templating system and many more out of the box, while on Node you'll need to mix and match a bunch of 3rd party libs or roll your own, which might be a good thing depending on your priorities but certainly kills productivity. On the frontend side, you can always use react with rails backend, but developing traditional template-based ui is usually faster than developing a react app and you can take advantage of rails templating/rendering feature to speed up development.
Re:Moving my serverless project to Ruby on Rails
by mattmanser on Sunday November 15, 2020 @11:47AM
(#25102523)
Even in mid-sized projects there's usually one or two pages with sufficiently complicated front-ends that it's worth having something like React in your toolbox, though it might be Vue or Svelte.
You don't have to make the whole app a SPA to use these tools. You can just use it in those few pages that really need it.
Re:Moving my serverless project to Ruby on Rails
by joelbluminator on Sunday November 15, 2020 @01:15PM
(#25103347)
Meh, put React into your build, maintain the thing, make the website download and parse React - all that just for one page? Better be a damn dynamic page. I wouldn't do it even if it's a big form with some dynamic fields.
Re:Moving my serverless project to Ruby on Rails
by emteycz on Sunday November 15, 2020 @04:07PM
(#25104844)
It's very easy to load React only on the page that needs it. Use dynamic ES module import, or link the standalone builds only on the pages that use it.
Alternative like Preact is very small and can be easily (pre)cached on the client side.
Re:Moving my serverless project to Ruby on Rails
by sodapopcan on Sunday November 15, 2020 @10:24AM
(#25101857)
Why bother? I work on a very UI-heavy interactive app (it's a gantt chart) for work and therefore have been doing react daily for 1.5 years. React is probably making life a little easier here, and I don't hate it, but I don't love it either. If I didn't love my team so much I would be looking for a job working on a more classic web app in Rails. And when I profess my appreciation for Rails, I could just as easily be talking about Django, Phoenix, or any other _opinionated_ backend framework. [edited for spelling]
Re:Moving my serverless project to Ruby on Rails
by kawsper on Sunday November 15, 2020 @11:08AM
(#25102188)
I know some Rails shops that are switching to Stimulus Reflex for some UI-heavy things, it works like Phoenix LiveViews, you can briefly see how CodeFund uses it for their interfaces here (40 seconds in): https://www.youtube.com/watch?v=F5hA79vKE_E&feature=youtu.be...
Re:Moving my serverless project to Ruby on Rails
by sodapopcan on Sunday November 15, 2020 @11:31AM
(#25102378)
I'm aware of Stimulus Reflex though never tried it out! :) I've been playing with LiveView a lot recently which is fantastic. I would love to switch to stimulus but we're pretty heavily bought into React at this point.
Re:Moving my serverless project to Ruby on Rails
by nickthemagicman on Sunday November 15, 2020 @10:20AM
(#25101827)
I personally like Ruby better than Node and Svelte better than React.
So that weekend could rabbit hole into complexity figuring out which framework to use.
Re:Moving my serverless project to Ruby on Rails
by ricketycricket on Sunday November 15, 2020 @11:22AM
(#25102314)
They work at Facebook on react native. I’m guessing they know react.