Ted Neward on Object/Relational Mappers

Sunday, Jul 2, 2006, 07:12

Ted Neward has written an excellent analysis of the failings of object/relational mapping approaches.

Unfortunately, his choice of analogy is a blight on the article. It is completely pointless, and I can’t help feeling that he chose it purely for shock value. If you’re interested in what he has to say, ignore the history lessons like the plague and skip clear past the first section. While you’re at it, go right past the introductory paragraph of the technical section too. You won’t miss a thing. I did exactly that, and it didn’t hamper my ability to follow the technical discussion one bit. In fact, the Vietnam analogy doesn’t even show up once he gets into the meat of his exposition – only at the end does he make a feeble, weakly grasping attempt to tie back into it. Jeff Donnici complains that A Distasteful Analogy Stays That Way; James Robertson laconically quips:

Rule number one when making an analogy: Don’t pick one that will immediately drive the conversation into a ditch. It’s like saying: “whatever you do, don’t think of a zebra”…

I can only agree. If you manage to hold your nose where required, however, you’ll find an excellent article with lots of substance.

Two years ago I worked on a project using Class::DBI, the Perl ORM of choice at the time. I’ve wanted to rant about the subject ever since. Proof once again that anything you want to rant about will be written up by someone else if you just wait long enough and you’ll have one less long-languishing draft. Nowadays, after a long period of staunch rejection of any approach that tries to abstract away SQL, I’m starting to warm up to DBIx::Class, the new shooting star. Its approach is very different from the obvious; calling it an ORM feels downright misleading, to an extent. It doesn’t really map the relational into the object world so much as that it provides an object-oriented, resultset-based API to the database. One might argue that it takes the Integration of relational concepts into frameworks escape path discussed in the article, but there are differences. In any case, so far it feels very sane and very tenable.

Via Henning Koch’s links.