4 ms·
I had to check the date because this could've been written 20 years ago. Developers don't need other developers to tell them when or when not to use ORM. We kn
by threeseed 8y ago
I had to check the date because this could've been written 20 years ago.
Developers don't need other developers to tell them when or when not to use ORM. We know how it works. Some use cases are better for a quick inline SQL whilst others where you have hundreds of tables would lend well to ORM. It's not one size fits all and I'm sure we've all written a few apps in our time to know this to be the case.
And this idea you can just learn "one SQL" is pretty laughable. There is a subset of SQL that works across many (but not all) relational databases. But each database has its extensions which you really should be using to get maximum performance. ORMs automatically take advantage of these just to mention. And the behaviours you will get can differ immensely.
- scarface74 8y agoBut each database has its extensions which you really should be using to get maximum performance. ORMs automatically take advantage of these just to mention. And the behaviours you will get can differ immensely. But if you use vendor specific extensions you will have “vendor lock-in”. What if someday on a whim your CTO decides to change the database your entire multi billion dollar organization from depending on Microsoft/Oracle and wants to go open source? Yes I’m being sarcastic. In reality, statistically no company makes those types of sweeping changes because the risks are too high and the rewards are too low.
- avmich 8y agoCompany may very well not have a choice. A couple of weeks ago a customer requested Oracle instead of MS SQL - now somebody is looking into all places checking if SQL is good enough. To me the saying "ORM is a Vietnam of computer science" rings true too often. Somehow projects which I deal with don't really benefit from ORM... so I could live completely with SQL alone.
- scarface74 8y agoIf I were writing apps that were sold to customers, that would be even more of a reason to use LINQ - not most ORMs though. I know about a software package that was written in C# that officially supported Sql Server,Oracle, and Mongo and he was able to support all three with basically the same codebase using Linq and runtime translated Expression<Func<T>> statements. His LINQ queries and expressions were the same across data stores.
- coldtea 8y ago>I had to check the date because this could've been written 20 years ago. And would have been just as correct. Of course today people understand this better and distrust ORMs increasingly more, whereas back 10-15 years ago then it was the heyday of enterprise Java and all the ORM craziness. At least we're also over the NoSQL fad too...