It's phenomenally easy to abuse object relational mappers (ORMs). I see all sorts of silly things going on with them and I'm cocky enough to think that I can avoid the worst of problems with them, but I'm humble enough (ha!) to know that others can give me great suggestions.
I want to do a write-up for my O'Reilly blog about how to minimize problems with ORMs. There are plenty of articles about which ORM to use or whether you should use them, but I want to focus on how to use them properly if you must. The important thing is to actually understand object-oriented programming and how an ORM can hinder this when abused. Thus, the goal is primarily to not treat the ORM classes as your actual object layer, but to have them hidden by your object layer (or model, if you prefer).
What techniques would you have for others to adopt or avoid when using ORMs? If fact, when would you choose to use or not use an ORM? (Note, I'm assuming you think there might be some proper role for an ORM. I've read plenty of "never" arguments and that's not what I'm looking for here.)
Cheers,
Ovid
New address of my CGI Course.
In reply to Whip Me, Beat Me, Make Me Use ORMs by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |