Live data from Hacker News

Rails 7.1 Released

github.com

61–70 of 245 posts

Re: Rails 7.1 Released

#61
post #16
post #12

Earlier quoted context omitted.

It could take a lot more than luck. If it turns out to be a rabbit hole stick with react unless you have a really good reason for that kind of refactor

The react code base is written by me, a backend/infra person and it was the first time I used it. It is a mess and the worst is that all the system tests are super flaky because of weird react DOM stuff.

In that case you’re probably alright with the rewrite. My opinion is to stick to React and rewrite the parts you think are nasty.

That’s only because this can turn into a real rabbit hole in my experience. But at that size maybe it won’t be so bad.

Best of luck!

Re: Rails 7.1 Released

#62
post #5

Earlier quoted context omitted.

I'm working on a fairly recent Rails 7 code base. We initially started using Stimulus, but are now considering switching to React for a few reasons: - if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger - it's getting harder and harder to find vanilla JS packages that you can wrap in Stimulus controllers for common tasks, compared to finding React packages -…

Comparing the two: I have a hard time understanding how one could write FE code using classes (Stimulus) in 2023, when simple functions with inputs and outputs are there for the taking. It's just asking for trouble and hidden complexity. Choose wisely!

> when simple functions with inputs and outputs

And the state library, and the hooks for side effects, and the SSR, and the hydration, and the VDOM, and... It's not that simple.

Re: Rails 7.1 Released

#63

Earlier quoted context omitted.

> if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger Can't these candidates quickly learn Hotwire? Seems like its much simpler than React (less moving parts)

You'd be surprised how many candidates would prefer to just take another job. If for no other reason than resume building with the word react.

Then that was not a good candidate from the get go? What about hiring people that really care about the product they're building and not just tool fanatics?

Re: Rails 7.1 Released

#64
post #60

Don't get me wrong, I love Rails, and have been using it off and on since Rails 2. It's a really good framework, and for someone like me who needs to stand up a website from time to time it really is the path of least resistance. What bugs me is the pain of setting up a new laptop to run Rails. I need node, which means npm. I'm a backend guy, I don't understand how to set up node, what order to do things in, etc. I d…

I've never done rails, please tell me, why does "ruby on rails" need nodejs for? Also it's fairly easy to install node. Too easy in fact. I wish it was much harder, and required a degree.

Rails lets you use modern JS frontend tools.

Re: Rails 7.1 Released

#65

Don't get me wrong, I love Rails, and have been using it off and on since Rails 2. It's a really good framework, and for someone like me who needs to stand up a website from time to time it really is the path of least resistance. What bugs me is the pain of setting up a new laptop to run Rails. I need node, which means npm. I'm a backend guy, I don't understand how to set up node, what order to do things in, etc. I d…

It’s still a problem, especially in mid size or large apps. Unless you have someone taking care of the bootstrap process, it inevitably breaks down.

Eventually only one person can get it working so I suppose it’s job security so perhaps it’s not so bad

That’s for every framework though, Rails isn’t that bad, relatively

Re: Rails 7.1 Released

#66
Rails is great, and better than ever. I've spent most of my early years in the field working with Django and Laravel, then moved to frontend doing [all the usual stuff we do nowadays] and this year I was assigned back to a Rails + Hotwire project.

I'm truly amazed how much simpler things are. I feel sad most of us have forgotten how easier things could be, and I'm terrified about new people joining this industry that will never know about how easier things could be because they'll never experience that (as things are right now, who knows the future...).

If you're reading this and never tried Rails, or discarded it because you listened somebody say the usual "PHP is ugly/Rails is dead/JavaScript is messy" give it a try with an open mind and ignore what others say for a moment. I can't recommend it enough.

It might not be the best tool if you have 1k engineers working on the same repository, but as a small team it has no competitors, it's just miles ahead everything else (well, honestly, maybe Laravel is as good).

Re: Rails 7.1 Released

#67

Would anyone start a new project with Rails today? If someone suggested using Rails for a new project to me today, I would show them the door. There are so many more mature frameworks in more robust and performant languages. IMO the only reason to use Rails today is if you’re too uncurious to learn something better.

Looking at the new Hotwire stuff. It’s neat from a technical perspective but looks dreadful to me. Why double down on a sloppy backend language when hardly any of the needed logic for a web application is backend? Especially when the alternatives include a full stack of TypeScript, a robust, performant, strongly typed, fantastically tooled language?

I was an RoR developer for a decade. These code bases do not age well. The test requirements of loosely typed languages are so much greater. The lack of ability to automate refactors alone is enough to avoid ruby.

Re: Rails 7.1 Released

#68
post #2

Currently stuck on a fairly large code base on rails 6 with a ton of react and trying to upgrade to the new “non”-JS way with Hotwire. Wish me luck Rails is great when you stick with the defaults and a land of pain as soon as you leave them.

Loose typing is a nightmare. The youngins always learn the hard way.

Loose typing is a blessing. Reading and writing code with type declarations everywhere is a nightmare. YMMV.

Re: Rails 7.1 Released

#69

Don't get me wrong, I love Rails, and have been using it off and on since Rails 2. It's a really good framework, and for someone like me who needs to stand up a website from time to time it really is the path of least resistance. What bugs me is the pain of setting up a new laptop to run Rails. I need node, which means npm. I'm a backend guy, I don't understand how to set up node, what order to do things in, etc. I d…

>I'm a backend guy, I don't understand how to set up node

I understand that Node is mostly known as a frontend tool and Rails uses it for that, but as far as I remember Node was as least initially developed to bring JavaScript runtime to backends.

Even without a package manager node is just a node.exe under Windows, and I think you just have to download and unpack npm and then put node and npm into your PATH environment variable.

Re: Rails 7.1 Released

#70
post #5

Earlier quoted context omitted.

I'm working on a fairly recent Rails 7 code base. We initially started using Stimulus, but are now considering switching to React for a few reasons: - if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger - it's getting harder and harder to find vanilla JS packages that you can wrap in Stimulus controllers for common tasks, compared to finding React packages -…

> if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger Can't these candidates quickly learn Hotwire? Seems like its much simpler than React (less moving parts)

No because every job wants you to hit the ground running. They’ll start asking for “10 years experience in Rails Hotwire” at some point
Post reply on HN