News for hackers. Stuff that matters.
Re:Ruby on Rails in a week by cortesoft on Thursday October 29, 2020 @10:03PM (#24938350)
I really should try Rails again. I LOVE ruby, but have been anti-rails for a while and I am not sure I am right for that.

I got into Ruby programming through Rails... but in 2005. Rails was brand new (I think I was on version like 0.12 or something?), and I slowly moved away from it to things like Sinatra and Sequel. Rails had some huge performance issues, and active record was pretty unusable at any sort of scale unless you did a lot of custom SQL.

I know it has come a long way in 15 years, I should try again

Re:Ruby on Rails in a week by Mavvie on Thursday October 29, 2020 @10:21PM (#24938467)
I'm sure it depends on the complexity of the app you're building. For simple crud-ish apps (ecommerce, online auctions, etc) I've found that I don't need to write even a single line of custom SQL, and performance is generally good (lots of N+1s, but these are easy to avoid with things like bullet). I also love being able to let Rails render most HTML, and the few things that need to be very dynamic you can just throw a single react component in without worrying about the usual SPA problems.

If you're just prototyping stuff, I don't think you can beat Rails for productivity. But if you're targeting something more enterprise or large scale, I don't think it's a good choice. Go/Rust are so much faster (not that that matters a lot), and even things like C#/Java pretty nice to use nowadays.

Re:Ruby on Rails in a week by christudor on Friday October 30, 2020 @04:49AM (#24940347)
"lots of N+1s, but these are easy to avoid with things like bullet"

What is bullet?

Re:Ruby on Rails in a week by mokkol on Friday October 30, 2020 @04:54AM (#24940375)
It is a plugin/gem that helps you track N+1 queries.

https://github.com/flyerhzm/bullet

Re:Ruby on Rails in a week by christudor on Saturday November 07, 2020 @07:05AM (#25014610)
Thank you!
Re:Ruby on Rails in a week by andysomniac on Friday October 30, 2020 @04:53AM (#24940370)
It is a gem that tells you when you are accidentally making a N+1 query and suggests the best way to fix it in AR (it also tells you when you have over used includes that are not needed and other such tweaks to make to your queries).
Re:Ruby on Rails in a week by skipants on Thursday October 29, 2020 @10:58PM (#24938671)
It's definitely a lot better -- performance-wise -- now. It has its flaws but I still feel like its one of the best frameworks out there.