What's Wrong With ORM

Dirk Koopman djk at tobit.co.uk
Fri Mar 24 15:29:30 GMT 2006

On Thu, 2006-03-23 at 23:09 +0000, Dave Cross wrote:
> Slides from tonight's little rant are online at
>    http://dave.org.uk/talks/lpm/2006/orm/
> Enjoy,

Looked at the slides. Very nice. I actually agree with some of it (much
to my surprise), especially the bits to with range checking and basic
referential integrity.  

However, I have a problem with all "automatic program generator from x/y
resource" systems, of which ORM is just one, viz: None of them cope
nicely with change. On a proper system with 100+ tables: add a column or
10 over several tables and regenerate the classes does not, by itself,
cut it. 

A successful business is one that is constantly changing: "More, Better,
for Less" as I believe Sir John Harvey-Jones once said. Too many
programs and especially "programming systems" are predicated on having a
fixed target to hit. There ain't no such animal, even if you have to
notionally freeze the problem, temporarily, for the sake getting
anything done. Once it is done, the chances are people are going to want
it changed, usually sooner than later.

Stuffing the wrong sort of "meta-data" into the database (and I am
thinking inappropriate triggers and stored procedures here that
"implement business logic" here) makes change harder for all sorts of
reasons, both technical and people centred.  

Keep business logic and the data it uses strictly separate. 


More information about the london.pm mailing list