News for hackers. Stuff that matters.
Re:Ruby on Rails in a week by dstorm1 on Thursday October 29, 2020 @10:04PM (#24938359)
Is it just me or is Rails really complex? Its abstractions are so far removed from anything familiar (HTTP, SQL) that its difficult to understand what is happening unless you deeply understand the framework.
Re:Ruby on Rails in a week by TheRealDunkirk on Friday October 30, 2020 @08:24AM (#24941482)
The whole thing centers on ActiveRecord. Understand that, and you're basically done. Be warned, though. Once you do, you'll never want to go back to any other ORM's.
Re:Ruby on Rails in a week by burlesona on Friday October 30, 2020 @12:08AM (#24939058)
Rails is somewhat complex, but it's a weird kind of complexity. In some ways it is like React: it's almost easier if you learn it first, before you know what it's doing under the hood, so you're not asking yourself "how" all the time.

The good thing about Rails is it's very well-documented, and if you just work your way through the entire Rails guide or the Rails Tutorial, by the end it all clicks together and makes a lot of sense, and from there on it becomes really easy.

Re:Ruby on Rails in a week by chowned on Friday October 30, 2020 @12:49AM (#24939286)
The point is to rely on the abstractions. :) I get similar feelings, especially having been burned by software in the past that purported to abstract things properly. But perhaps unlike other frameworks/libraries, I think Rails has solid abstractions. Of course they're not perfect, but much like abstractions provided by an OS, they are complex, and you mostly don't have to worry about implementation details. (And when you do, that's okay, because the documentation is solid too and the code is available.)

I've been working with Django lately and I definitely had to learn to let go and trust stuff like the ORM. But after watching migrations get handled automatically and easily adding foreign key relationships to tables, I was hooked. I used to be firmly in the "almost never ORM" camp, but that's changed.