News for hackers. Stuff that matters.
Re:Ruby 3.4.0 by t-writescode on Wednesday December 25, 2024 @03:56AM (#42507764)
Rails has some very, very good features that make standing up a CRUD app with an administrative backend _very easy_.

It's also got a bunch of semi-functional-programming paradigms throughout that make life quite a bit easier when you get used to using them.

Honestly, if it had types by default and across all / most of its packages easily (no. Sorbet + Rails is pain, or at least was last I tried), I'd probably recommend it over a lot of other languages.

Re:Ruby 3.4.0 by FBISurveillance on Wednesday December 25, 2024 @04:10AM (#42507818)
I love Rails and spent a good chunk of my career using it - and I'd recommend it more if only the frontend story wasn't that bumpy over the years with all the variations of asset pipelines.

I wish the TypeScript/React integration was easier. Say what you will but there's no way you can achieve interactivity and convenience of React (et al) UIs with Turbo/Hotwire in a meaningful time.

Re:Ruby 3.4.0 by block_dagger on Wednesday December 25, 2024 @04:30AM (#42507871)
Try React on Rails [1]. I’ve found it to be a very pleasant development experience.

[1] https://github.com/shakacode/react_on_rails

Re:Ruby 3.4.0 by jherdman on Wednesday December 25, 2024 @07:38AM (#42508516)
Agreed re asset pipelines. I definitely have Webpacker related scar tissue.

Have you tried either Inertia (https://github.com/inertiajs/inertia-rails) or vite-ruby (https://vite-ruby.netlify.app/)? Both look very promising.

Re:Ruby 3.4.0 by ysavir on Wednesday December 25, 2024 @08:44AM (#42508740)
I converted from webpacker (or rather shakapacker, the continuation after rails moved away from webpacker) to vite_rails recently, and it's been such a breath of fresh air. It's easy to set up, and easier to maintain. Strongly recommended.
Re:Ruby 3.4.0 by TheSmoke on Wednesday December 25, 2024 @07:51AM (#42508558)
I definitely suggest using vite and the vite ruby gem. Create your Rails app, Create your TS + React app with vite, add the vite gem and done. It does not get better than that. Super fantastic.
Re:Ruby 3.4.0 by ajmurmann on Wednesday December 25, 2024 @11:34AM (#42509562)
Can you elaborate more in this? Years ago, I used to primarily do Rails development. Recently I built some web apps that use a JVM backend (one app uses Java & Spring and the other Kotlin & Micronaut) and a React frontend. One thing I ended up really missing issue the the frameworks, especially with disjointed fronted, don't solve the standard issue of a request sending an invalid form entry and showing the validation errors on the form. I ended up building my own implementation of that which of course also requires a convention on message format. Since most apps need to solve this it's so weird to be that frameworks nowadays don't solve this out of the box.
Re:Ruby 3.4.0 by viraptor on Wednesday December 25, 2024 @06:36AM (#42508305)
If you're happy to trade the ecosystem and a bit of compilation speed for types, then Crystal is a perfectly cromulent choice.
Re:Ruby 3.4.0 by jbverschoor on Wednesday December 25, 2024 @09:51AM (#42509042)
Except it's not because:

1) It has differences in behavior with certain classes and is not a drop-in replacement.

2) It always compiles, so it's kind of slow to compile-test

Re:Ruby 3.4.0 by viraptor on Wednesday December 25, 2024 @02:11PM (#42510511)
It's not a 100% compatible replacement, but I've ported a few things with only trivial chances. I didn't say it's a drop in, just that it's a fine choice.

Compile/test time is ok. It's a few extra seconds to run tests, but hasn't been an issue in practice for me.

Re:Ruby 3.4.0 by t-writescode on Wednesday December 25, 2024 @01:25PM (#42510256)
I've heard good things, yeah :)

I've tend to have found Kotlin to be the direction I'm more happy going with. It speaks to my particular itches for me personally, more effectively. I can absolutely see how it's a very effective choice.