What ASP.NET MVC Did Learn from Rails
This morning, I saw two different posts from
Rails developers who were newly learning ASP.NET MVC, both
bemoaning the fact that ASP.NET MVC does not supply/force upon you one particular ORM. The
dependency on ActiveRecord is, to my way of thinking, a shortcoming of Rails,
which the Rails community is presently doing an exceptional job of fixing. The best way to learn from that mistake is to not repeat it.
Yes, it is true that ASP.NET MVC does not force you to use one particular ORM. Yes, that means that you're going to have to expend some thought, and quite possibly even effort, deciding which one is appropriate for you. It will not be sufficient to read a blog post about the Entity Framework from somebody who tried it once and another blog post about NHibernate from somebody who saw a screencast about it and then conclude that there are no workable solutions in the world.
But it's worth the effort, because you have a big reward in store: Whatever choice you make will work just fine with ASP.NET MVC. Because the framework has no dependencies whatsoever on any ORM, all ORMs work equally well. You get to choose the best tool for your data access needs without worrying that your web framework will reject it.