4 ms·
Good abstractions allow themselves to get out of the way when necessary. There are for sure bad examples of abstractions, but there's also plenty of ORMs that l
by ryanbrunner 7y ago
Good abstractions allow themselves to get out of the way when necessary. There are for sure bad examples of abstractions, but there's also plenty of ORMs that let you bypass the abstraction completely when needed (or use the parts of it still applicable).
I also don't really understand your last statement. Abstractions, pretty much by definition, never allow you to do more than the underlying technology they're abstracting. They necessarily limit power in order to make code more comprehensible and maintainable. That's true for any abstraction I can think of, leaky or not.
- learc83 7y agoIn addition to getting out od the way I prefer when an ORM allows me to extend it to build my own abstractions. For example in Rails when I have a complicated query, I can make write some SQL, stick it in a view, and make a view backed model. Then I can keep using Active Record to make it easier use the query in multiple places, easily compose additional queries etc...