Live data from Hacker News

Rails developers should learn React

medium.com

31–40 of 57 posts

Re: Rails developers should learn React

#31
post #7

I think I must have some sort of strange default wiring in my brain. I've developed code for over 30 years using many different languages, but when I tried to get into Rails about 10 years ago, I just couldn't get my head around it. Nothing seemed to click and go into place for me. I ended up using Ruby, but via a Sinatra based framework called Padrino. It just seemed to make more sense to me. The same thing more rec…

I'm not sure if I'm "young" in this instance, but I'm 31 and have been coding since I was ~15 and I had the same feeling. "An ill fitting jacket" is a nice way to describe it - I can't put my finger on exactly what feels wrong but a lot of things that "magically" happen bother me.

Also 31, also coding since ~15, and also had trouble wrapping my head around Rails.

For me I think it was mainly because with Rails, the implicit conventions are actually hidden rules, and they're not always intuitive either, which made memorizing them much harder than, say, memorizing a small set of simple functions in an actual library. That's probably also why I have so much trouble with CSS I'm guessing.

These days I maintain a Clojure web app that uses Compojure, and I have to say it's significantly easier to reason about than the iceberg Rails is.

Re: Rails developers should learn React

#32

I think I must have some sort of strange default wiring in my brain. I've developed code for over 30 years using many different languages, but when I tried to get into Rails about 10 years ago, I just couldn't get my head around it. Nothing seemed to click and go into place for me. I ended up using Ruby, but via a Sinatra based framework called Padrino. It just seemed to make more sense to me. The same thing more rec…

I felt the same way at first, but I read through the rails guides and it all made sense. And for people who work on a bunch of different CRUD apps all that conformity is a big win. You can jump back into a project and already know where everything is and how it fits together.

Re: Rails developers should learn React

#33
post #29

Earlier quoted context omitted.

It absolutely baffles me that people still like to call React a "Technology du jour". It's ubiquitous today. It's _THE_ go-to front-end web development UI framework.

In your bubble that might be true. In my bubble everyone is still using mostly ad-hoc jquery consisting half of snippets copy-pasted from stackoverflow.

What bubble is that may I ask?

Re: Rails developers should learn React

#34

Honest question, is it really here to stay? What's different between React today and Backbone 4 years ago or Angular 2 years ago? Does it solve all the problems of the predecessors? People are already starting to talk about Vue like it's the new messiah.

I believe it is, the problem with both Backbone and Angular is that they treat UI development like it is still assembling a page and then sending it down to the client. They encourage monolithic controllers that are not discreetly tied to the UI. This was a natural outgrowth of web developers being comfortable with that model in transitioning over from the server side. The problem is, it sucked on the server side and it sucks on the client side.

In my opinion Vue does not solve the problem that react does as it does not black box the component and define you inputs and outputs. You can still write monolithic code-bases with it. It has a stronger component model than Angular did with directives but that component model can be circumvented. Worse yet two way binding is the crack of web dev. It gets you hooked on it's "easy" but as your code-base explodes you loose all trace-ability of when and how stuff changes and in my opinion, that is where the nastiest bugs surface.

If you actually get into the internals of react, you soon realize it looks a lot like windows UI programming in the old days. It is a return to principals that work when composing UI's from components. It's not a new concept, there have been many frameworks that tried it over the years (Dojo comes to mind) but react was the first one to hit critical mass and the first one to come along while most of the other tool-chain was available or fairly easy to build. The tool-chain makes it complex to get started but once you have a project going, it is far easier to maintain, and maintenance is where you really pay for your total cost of ownership.

Now all this comes with the caveats of project size, I personally work on large scale replacement of traditional application with web based applications and I think react (and it's tool-chain) is an excellent technology to manage a large code base that business apps require. However if all you are building is an informational website with a newsletter sign up form, it's just not the right technology.

Re: Rails developers should learn React

#35
post #27

If there's one current technology that I wouldn't call omakase , it would be React. I thought it would get better once redux reached a certain mindshare, but now there's a plethora of redux helpers, "best" practices etc. (Each of which seems to focus on a new and/or experimental JavaScript language feature) Hey, I program Perl in my day job, but this is way too much Tim Toady even for me. (And if "more money" were th…

Will you explain what you mean a bit more, please? I don't understand your analogies.

Re: Rails developers should learn React

#36
post #13
post #7

Earlier quoted context omitted.

I'm not sure if I'm "young" in this instance, but I'm 31 and have been coding since I was ~15 and I had the same feeling. "An ill fitting jacket" is a nice way to describe it - I can't put my finger on exactly what feels wrong but a lot of things that "magically" happen bother me.

Actually for me, React fitted me well as a jacket! Until a friend asked me why there was and advantage to spend an extra minute taking on and off that jacket instead of using a simpler jacket(vanillajs) that fitted just as well but that I could take on and off in seconds. My conclusion today is that the massive hype around React, Angular and so on, is a similar story as The Emperor's new clothes.

> vanillajs

Even if you don't need a view framework, do you do serious work with no libraries? What browsers do you support?

It'd get really frustrating to support even IE10 with nothing protecting you from random idiosyncrasy

Re: Rails developers should learn React

#37
post #10

I'd like to know where he's getting his figures about Rails from. As someone who left a Rails job (no React) fairly recently and has now switched to a React-centric role, while I was job-hunting there didn't seem to be a great demand for developers who knew React and Rails. It's almost like they're suggesting that people from a Django background will be worse off, which I disagree with. Regardless, I do agree that Fu…

I've only seen this where companies had some of their apps/infrastructure running off Rails(mostly API based stuff, minimal services etc) and were wanting to use React on the front end. I haven't seen a lot of postings either for the specific pairing.

I honestly haven't seen a ton of Rails job posts over the last two years. Mostly Node or C# posts or the occasional PHP as far as backend code goes.

I like Rails too, first true MVC I used.

Re: Rails developers should learn React

#38
Serious question: what's the advantage of using Rails for the backend/APIs over Node or various Python frameworks?

I want to pick up a new backend stack and deciding between Rails and Go.

Re: Rails developers should learn React

#39

I think I must have some sort of strange default wiring in my brain. I've developed code for over 30 years using many different languages, but when I tried to get into Rails about 10 years ago, I just couldn't get my head around it. Nothing seemed to click and go into place for me. I ended up using Ruby, but via a Sinatra based framework called Padrino. It just seemed to make more sense to me. The same thing more rec…

Sounds like your sweet spot is more towards the library end of library/'light weight framework' vs the 'full blown framework' spectrum. I don't believe it has anything to do with age.

Except Vue is a framework but React isn't.

Re: Rails developers should learn React

#40
post #29

Earlier quoted context omitted.

In your bubble that might be true. In my bubble everyone is still using mostly ad-hoc jquery consisting half of snippets copy-pasted from stackoverflow.

What bubble is that may I ask?

I share a bubble with eterm, in a Fortune 100 enterprise. I have heard React mentioned once by a particularly engaged front-end developer, but everything I know of in production is JQuery, a couple Angular 1 apps, and a whole lot of horrible older stuff.
Post reply on HN