3 ms·
To be blunt, I see a lot of irony in your post. > People decided these ORMs were amazing and then completely > ignored all the bugs introduced by this layer a
by jsight 9y ago
To be blunt, I see a lot of irony in your post.
> People decided these ORMs were amazing and then completely
> ignored all the bugs introduced by this layer and effort
> spent trying to figure out what the ORM was doing and how
> to make it do the right thing.
For every person that did this, I've run into at least one other that was convinced that ORMs were the most evil thing ever and that they should roll their own little Object Mapper. Every one of them would then completely ignore all the bugs introduced and effort spent trying to train new developers on their slightly unique thing and how to coerce it into doing the right thing.
"I've come to the conclusion that people have this tendency to decide X is bad and then go completely out of their way to avoid X. [...] Take the Hibernate example. Once you bought into that framework you had to do all your data access that way or you broke the caching."
There is nothing about Hibernate that requires you to fully buy into caching, or even to fully buy into its abstraction. In fact, I've generally avoided caching in Hibernate in order to retain the flexibility to do what I needed without it when I needed to.
Usually about 90% of the code ends up being really boring CRUD with trivial queries. The last 10% could be implemented with whatever crazy approach made sense.
And this isn't to knock those other frameworks either. iBatis and quite a few other early Java ORMs were quite good and arguably better than Hibernate was at the time, but Hibernate was marketed more effectively.