Saturday, June 04, 2011

ORMs

There has been a backlash against ORMs. I missed it. While you were all messing around with Nhibernate. I avoided it. Why? because I can always write database queries much easier in SQL.

Always.

My mappings were much better when I mapped in with NH. I've always worked in smaller teams and much of the code has been written procedurally.

There I said it.

But this is why I like ORMs... because over several years into .net people are still writing procedural code. For the first time people were forced to think about domain objects.

and now we have EF. Ef is now getting people to think code first. (Wow welcome to the 1980s)

and now we have stuff simple.data.

ORMs were supposed to remove the impedance mistmatch between tables and code. This has only been solvee if your forward generate.

For those of us with legacy systems  all this backwards mapping is too much of a ball ache.
minimilist web frameworks don;t help and this is why I'm writing crap like SQl.data.
We don't need to worry what to call our call because its the name of the entity. we don't need to worry about joins because its the best SQL we can write.

Lets not worry about the mismatch because we can do what the devs did in the 80s. We write the best DSL to query data evar. S Q L.

No comments: