News for hackers. Stuff that matters.
Re:What ORMs have taught me: just learn SQL (2014) by bunderbunder on Sunday June 26, 2016 @11:38PM (#11984086)
I've been at companies that did use ORMs, and still ended up with that kind of mess.

No tool is ever a substitute for discipline.

Re:What ORMs have taught me: just learn SQL (2014) by lmm on Monday June 27, 2016 @03:57AM (#11984741)
> No tool is ever a substitute for discipline.

My experience is exactly the opposite. Humans are too fallible for discipline to ever be reliable. If you want something done, automate it.

Re:What ORMs have taught me: just learn SQL (2014) by cptskippy on Monday June 27, 2016 @10:20AM (#11986275)
In my experience you're both right.

The enterprise wants everyone to be a jack of all trades and to understand everything. Part of the reason for the massive layering that takes place is so that things are compartmentalized and easier for an individual to pickup and put down as they're shuffled around from project to project. Standardization, documentation, consistency, and discipline are essential for enterprise developers to be able to quickly grok a project and make the necessary changes.

Automation also plays an important role because it allows less skilled and knowledgeable individuals of lower pay grades monitor the blinky lights and only call on the big boys when things fail.

Re:What ORMs have taught me: just learn SQL (2014) by EGreg on Monday June 27, 2016 @12:55AM (#11984265)
ORMs let you structure your queries in a way that allows the app to understand them and analyze them, for sharding purposes. True, you can write SQL and then parse it yourself in a proxy, but why?
Re:What ORMs have taught me: just learn SQL (2014) by z92 on Monday June 27, 2016 @02:04AM (#11984415)
If your ORM allows you to drop down to SQL, which the parent claims all modern ORMs do, then you will still need that SQL parser in your ORM.
Re:What ORMs have taught me: just learn SQL (2014) by EGreg on Monday June 27, 2016 @02:12PM (#11988121)
You can have a small subset of your queries in raw SQL and if you really need to shard them, you mark them up with structured metadata. But the rest would be automatically structured, analyzed and sharded.
Re:What ORMs have taught me: just learn SQL (2014) by lmm on Monday June 27, 2016 @06:08AM (#11985165)
Sure. So you can use the SQL parser from a mature, widely used library, or you can write your own. I know which option I would prefer, even if I was writing every single query by hand (not that I'd ever do that).