4 ms·
> I use OOP to construct good gateways into my tables. That's all an ORM is, a good default gateway to the tables that you don't have to write by hand.
by gnaritas 10y ago
> I use OOP to construct good gateways into my tables.
That's all an ORM is, a good default gateway to the tables that you don't have to write by hand.
- yawaramin 9y agoExcept for the times when they load all columns into memory and then you programmatically discard almost everything because you really just needed Person#name.
- remotehack 10y agoAn ORM is a gateway...not a good gateway.
- gnaritas 10y agoMost disagree, hence the popularity of ORM's.
- corpMaverick 10y agoORMs (i.e. Hibernate) try to hide the database. You change the objects and they are magically saved. See http://stackoverflow.com/questions/20863150/in-the-context-of-an-orm-what-is-transparent-persistence http://stackoverflow.com/questions/20863150/in-the-context-o...
- gnaritas 10y agoI've written ORM's, I don't need them explained to me, and no all ORM's don't try and hide the database, that's just one pattern. Others like ActiveRecord simply try and make life simpler without complete hiding behind so much magic you can't figure out what's going on. ORM's abstract the database, that's not the same as hiding the database.