Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just say no to ORM. Apart from the usual problems with impedance mismatch, there's one thing that is rarely talked about: Waste.

Most ORMs work like that: You get a request, you start a transaction, you begin instantiating lots of objects because you need those to do anything useful.

You then either serialize parts of that object tree into JSON or whatever, or you change a few objects, which then create UPSERT statements, the transaction commits (or not) and then...you are throwing it all away again!

You might save some state in some second level cache, but other than that, you just created a partially populated object graph, probably loaded way too much stuff, and then you do that AGAIN for the next transaction.

I've used JDO, Hibernate etc. before and nowadays it feels like extremely wasteful with limited productivity gains that quickly disappear if your objects become more complex.



We should band together and form the NoORM movement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: