3 ms·
> There's a middle ground. > Micro ORMs. And there's the mystical fourth option of simply not bothering with objects in the first place. No objects, no need t
by sjwright 7y ago
> There's a middle ground.
> Micro ORMs.
And there's the mystical fourth option of simply not bothering with objects in the first place. No objects, no need to do object-relational mapping.
- goatlover 7y agoSo then you’re mapping to whatever data structure your app uses instead of objects. In OOP languages like Python, everything is some type of object anyway.
- sjwright 7y agoThat’s just a semantic game. If your language returns the result of a query as a generic array of generic dictionaries (or whatever), that isn’t mapping, nor is it object oriented in principle.
- goatlover 7y agoBut then your generic array of generic dictionaries needs to be mapped to whatever data structures make sense for your application. ORMs save you that step.
- sjwright 7y agoI've written many apps and I've never experienced what you've described. I write my queries to return exactly the right data in exactly the right format in exactly the right order—so I can go straight from the generic data structures to the screen interface or document layout. Nothing says the structure which make sense for an application can't be a generic array of generic dictionaries. If your favourite programming language forces you to go through the silly hoops of data mapping in order to do useful things with query output, I can understand why an ORM might make sense for you.