views:

1990

answers:

6

We are looking into using an ORM and I wanted some opinions/comparisons

The basic criteria we have for an ORM is: Easy to use/configure(short learning curve), flexible, the ability to abstract it away, easy to maintain

Here is a list of what ORM we are looking at and what our initial impressions are

  1. Open Access - seems really easy for simple stuff, but doesn't seem to have a lot of flexibility, cost isn't an issue we already own it
  2. Ling to SQL - looks very simple to use and configure but is missing some functionality
  3. Active Record - NHibernate made simple
  4. SubSonic - looks very feature rich, but haven't really played with it much

here are the ORMs we have looked at and ruled out

  1. Entity is still in beta
  2. NHibernate has far to much of a learning curve (we don't have 3 weeks to delicate to learning it)
+2  A: 

For all the paired pennies it may be worth:

If you don't have 3 weeks now to learn your ORM of choice (whichever you choose), you may have to find 3 weeks to learn it later when it doesn't map something exactly how you thought it would.

If you have a model that's moderately complicated, ORM is non-trivial. You'll wind up needing to know how your ORM works so you can tell it to map things the way you want.

Which is all another way of saying "Know thy tools", of course. :)

BryCoBat
This is why one of the requirements is the ability to abstract it away, that why is something isn't working right we can code it ourselves.
Bob The Janitor
+1  A: 

Most folks will have a smattering of experience with one or two of those, but few will have exposure to all. I recommend a proof-of-concept effort with each of your favorites. Get each one set up, spending no more than n hours per ORM tool (n = however much time you decide is reasonable.) You don't have to implement your entire object model, a functional subset will do.

By the time you're done, you will have worked through the setup and some usage of all of them. You can then write up a post-mortem and the team can decide which has the best pain-to-feature ratio.

Dave Swersky
A: 

I very much agree with BryCoBat (upvoted). I wanted to also add that if you already own Open Access, then the company very likely has people somewhere internally who are already very comfortable with it, including code examples you look at in your own domain for both trivial and non-trivial tasks. In other words: use what you know.

Joel Coehoorn
we have open access because we use the rad controls and got the full Telerik suite
Bob The Janitor
+2  A: 

We currently use SubSonic (2.0.3) and it has been an absolute lifesaver. I cannot stress enough how awesome it is. HOWEVER, we are now looking at switching away from it for various reasons (probably to NHibernate or Entity). Here are my Pros and Cons of it:

Pros:

  • Very simple to setup and use.
  • Lots of great & useful, tools and features
  • Uses the "convention over configuration" philosophy, so very little configuration. It "just works". (As long as you do things the way it wants... :) )

Cons:

  • Your database design is very tightly coupled to your domain design. Make a change in your DB, and you need to change your code/domain design.
  • By default, SubSonic uses the ActiveRecord pattern for all data access instead of the Repository pattern, which makes it more difficult to "abstract it away". (Although I believe with v3.0 that you can swap out the default ActiveRecord templates to use the Repository pattern).
  • Lots of pessimistic rumours flying around about the future of SubSonic. But rumours are just that: Rumours.
Alex Czarto
+6  A: 

I'd say you should take a look at DataObjects.NET (http://www.x-tensive.com). It's feature rich and pretty easy to use. It does, though, absolutely tie you to your object model, as it decides what the database structure should be based on what your object model looks like. That being said, if you want to be able to disregard the existence of the database, it's quite nice. We've used it for years and have had great success.

+1  A: 

Use MyGeneration and create your own!!