4 ms·
I would like developers to learn SQL first before picking ORM to actually understand what the ORM is doing for them. Sure they'll be doing their share of sub-op
by tekkk 6y ago
I would like developers to learn SQL first before picking ORM to actually understand what the ORM is doing for them. Sure they'll be doing their share of sub-optimal subqueries and head bumping trying to write group by queries. But in the end I think this would make them better developers who knew the underlying software and application logic, not just the API of the ORM.
Yet we don't really live in that kind of ideal world and there are many factors that people have to consider. If everybody else in the company is using ORM, why shouldn't you. Or, if you just need to ship products and don't necessarily enjoy learning SQL. Or, if you don't know how to properly abstract the structured SQL queries without making it a huge mess. Saying that ORM is better/worse is like saying everybody likes music.
If I'm building a Nodejs app I would choose not to use ORM. For other languages and frameworks I'd probably reconsider and evaluate my options.
To me however, the biggest benefit of using no ORM is the learning of SQL. Time and time again that proves itself so invaluable, and I'm immensely happy I've learnt the quirks of SQL instead of some language specific API. If I can code faster with ORM that's great, but in ideal world I would much rather learn SQL and become a master of it rather than of some ORM.