Hacker News new | ask | show | jobs
by TheRealDunkirk 1399 days ago
I'm glad for you, but ActiveRecord is still the best ORM of all time. OF ALL TIME. I rewrote one of my main Rails applications in .NET, and trying to use Entity Framework was like pulling teeth for me, in comparison.
2 comments

I'm glad it works for you. It gave my team years of headache while we ported it all to jOOQ.

Also our Ruby engineers liked the flexibility so much that they exposed our entire database as a service to customers, which we had to emulate and support.

Two sides to every position.

Amen to that. We had a high-level engineer who sincerely believed that Rails and Postgres were the right tools for Everything. Consequently he shipped a mission-critical query engine whose API is - you guessed it - just ActiveRecord!

It's great if your users are disciplined and experienced Rails engineers who understand how the system works, but we don't live in fantasy land and a year later, we are so very constrained by the unlimited DB access that we're rewriting it all and leaving ActiveRecord out of the equation.

I'll always maintain that Rails is the first tool I'd reach for in a new web startup, and the first one I'd discard after growing past ~20 engineers.

> It's great if your users are disciplined and experienced Rails engineers who understand how the system works.

I'm continuously shocked at how much bad ActiveRecord code there is lying around given that it's so easy to just look at the SQL it generates and be like "yeah this looks reasonable".

WHY SPONGEBOB WHY!?! Why do you pass around your relations making all of ActiveRecord part of your external API? It's so hard to do stupid things with AR if you pretend that AR objects can't leave the scope they were fetched in.

> given that it's so easy to just look at the SQL it generates and be like "yeah this looks reasonable".

This makes the assumption that the viewer knows what reasonable SQL looks like in the first place.

> they exposed our entire database as a service to customers

ActiveRecord is the least of your problems, then... seems like you may have a fundamental problem of inexperienced or foolish devs.

You shouldn't blame Ruby (or ActiveRecord) for infrastructure decisions that are inherently bad, irrespective of platform or technology. I mean, this is HN, and you WILL, but you shouldn't. ;-)
Unfortunately we were a tiny Lisbon startup with our own in-house clone of AOL Server and Tcl was never a hyped language, otherwise I don't really see what it does better.

Our Tcl ORM was doing Sybase, SQL Server, DB2, Informix, Oracle and even Access, across Windows 2000/NT, AIX, HP-UX, Solaris, Linux, in 1999 - 2002.

But we never went big into US, so Rails gets the credits.

And we were not alone in this regard, there was Vignette, Cold Fusion, Zope,...