News for hackers. Stuff that matters.
Re:Is ORM still an anti-pattern? by recursivedoubts on Tuesday June 27, 2023 @04:44PM (#36498382)
ActiveRecord has always felt great to me: yes there are some corner cases to deal w/ but it hits the 80/20 spot, let's you kick out to SQL when you need to, adds a lot of excellent life-cycle related hooks that clean up domain logic, and is pretty easy to reason about

pragmatic ORMs that don't try to hide everything behind a "bundle" or introduce their own query language are great, it's the ones that try to totally "solve" the ORM problem that are hard to work with

Re:Is ORM still an anti-pattern? by tarsinge on Wednesday June 28, 2023 @01:32AM (#36502664)
Yes I can’t imagine going back to doing big CRUD apps without AR, readability and maintenance would take a hit. The catch is you need a prior good knowledge of SQL to use it correctly. Problems happen when people don’t learn SQL and then don’t understand the queries AR is generating and the limits.
Re:Is ORM still an anti-pattern? by Alifatisk on Wednesday June 28, 2023 @07:48AM (#36505096)
You hit the nail with this, ActiveRecord is truly a joy to use, when you stumble upon an edge case, you can always go back to raw sql again!

This is how an ORM should be.

Re:Is ORM still an anti-pattern? by thinkpad13 on Thursday June 29, 2023 @02:24PM (#36524619)
yeah i dont get why they complaint about orm, maybe its because the only orm that I use is activerecord