Dec 20 – NHibernate was not a silver bullet

For the longest time NHibernate has been the holy grail of ORMs for me. But the projects I’ve been in have mostly been using Linq2Sql and I’ve had the, admittedly naive, view that NH would solve the all pain points I’ve had with L2S.

And while the experience with model first and running tests against an in-memory database has been great many of the pain points remained. This is of course because the pain I felt is related to using an ORM in general and not a specific ORM framework. I’m talking about things like mapping (oh the mapping) and figuring out how to call the criteria API to get the optimal query etc. There’s also the CQRS-bit about using the same model for both reads and writes.

I’m guessing using a document DB will solve all my problems :p

Korallreven – As Young As Yesterday

  • Joel Abrahamsson

    I hear PHP plus inline SQL statements is the silver bullet. Advocates say it makes you really agile and your scrum master smiling.

  • Per-Frode Pedersen

    So what you’re saying is essentially that Fred P Brooks was right. Maybe that could be used as encouragement for developers to read more books?

  • Henrik Lindstrom

    It’s a ‘Catch 22′. The more abstraction we add on the querying the more we need to know about both the abstraction and the querying-language underneath to write optimal queries.

  • Tom Bushell

    I’ve found that Fluent NHibernate Automapping eliminates most (but not quite all) of the pain associated with ORM mapping.

    But, like you, I wonder if my life would be all rainbows and unicorns if I just switched to RavenDB…