Tuesday, July 21, 2009

Introducing ORM Smackdown

In an effort to become a better developer over the past few months I’ve created the project ORM Smackdown which can be found on CodePlex.  The idea is to create a reference application that would allow me to compare, contrast and evaluate different ORM’s objectively.  As of today (July 21, 2009), I would claim phase one of this project officially reached Alpha status, just in time for it’s introduction at South West Florida’s .NET User Group meeting. 

Phase One consists of the following ORM’s:

  • ADO.NET – Not really an ORM, but a baseline of how the given functionality works without an ORM
  • Entity Frameworks
  • LightSpeed
  • Linq to SQL
  • Linq to NHibernate
  • LLBLGen
  • NHibernate
  • SubSonic 2.2
  • SubSonic 3.0

Phase One

Features presented in Phase One:

  • Mapping Techniques for each ORM
  • Simple Inheritance
  • Basic CRUD (Create, Read, Update and Delete) functionality
  • Some basic Ad-Hoc Queries
  • Unit Test for CRUD and Ad-Hoc Quires
  • A Win Forms application that connects to SQL Profiler to show the generated SQL.  This application also uses the .NET frameworks StopWatch class to accurately capture timings for using the different ORMs.

To perform a fair and objective comparison I created two interfaces ICrud and IExerciser each of these defined a set of methods to be implemented using the different ORMS.  Then using TDD I implemented the interface for each ORM.  Then using poor-mans dependency injection I created instances of those implementations executed them with the same test runner and application.  The result was a project that demonstrates how each ORM performs the identical tasks.

Phase Two

Phase two will consist of the following features

  • Transactions
  • More advanced Inheritance Techniques
  • Concept of Unit of Work
  • Concurrency
  • Built in validation techniques
  • Scalability

To get the source and find out more about this project please visit projects web site on CodePlex at http://ormsmackdown.codeplex.com

If your interested in getting involved, have a better implementation for a particular ORM or have a favorite ORM that we aren’t evaluating, please feel free to drop me a note.

-ec

No comments:

Post a Comment