Hacker News new | ask | show | jobs
by DarkNova6 778 days ago
> But many apps don't have to care, and those are the ones where AR isn't such an albatross.

I am super defensive on this one. Apps can keep not caring about it... until they have to.

Is it that much more effort to have a clear boundary between domain and db-access? I think it is only effort if you don't know what you are doing... which is _precisely_ when you need it the most.

> Still, it serves all right as long as you treat it as a DB interface and not your canonical business object model.

I still don't get the benefits. If you decouple db-model from domain model you lose all "advantages" of AR. It's like having plain DTOs but with its sharp spikes sticking out if you ever do something wrong.

1 comments

You're preaching to the choir here: I much prefer datamapper ORMs when I even want an ORM at all (I'm not quite the OOP astronaut I once was). I'm saying AR's poor design isn't a noticeable drag in small scopes, especially for short-lived models whose only purpose is to populate a view. It's like having really fancy DTOs, and keeping them in the DTO bin is what keeps you from getting stuck with all the sharp spikes. Life can be comfy in a minefield when you have a map and don't wander too much :)