3 ms·
Personally I don't get ORM's. May be it's because the only I have had to deal with was Hibernate, and seemed to me as an innecesary layer of complexity and bloa
by samuel 17y ago
Personally I don't get ORM's. May be it's because the only I have had to deal with was Hibernate, and seemed to me as an innecesary layer of complexity and bloat, and objects and relations sometimes doesn't map nicely. If you want to persist objects, use an object datastore in the first place, not a relational one.
And, what's wrong with SQL? It's simple, powerful, widely known and deployed, and cool(declarative programming, dude!).
I've read a some introductory examples about distinct ORM's and just don't get it. Where's the gain? Apart from database independence(which I don't think it's even desirable in most cases, may be Tom Kyte's books have brainwashed me irremediably), can't see one. How an ORM makes you more productive?
- ilyak 17y agoHibernate is horrible. But, object datastores aren't an option most often. There are a lot of things wrong with SQL. For example, it's hard to do non-trivial queries because you can't say A = SELECT something FROM foo; SELECT another FROM bar WHERE field IN A. Of course, you can make a view, but views are database structure, and you really really really don't want to change database structure in runtime. So SQL sucks in some places. In object-oriented programs they have no use of your "tuples". They just can't do anything useful of them, nor give them away (because that would violate code separation). So they have to turn your tuples into some objects (or other objects). Therefore, ORMs.
- gaius 17y agoThe people who hate SQL don't know about any of the cool stuff it can do as they've only ever used MySQL's very basic implementation.