Wednesday, January 20, 2010

Object-Relational Mapping (ORM) Technology

Sharing an interesting post by Shawn Wildermuth, Are ORM’s Solving Anything. Be sure to read the comments as well for more insight from his readers.

I’m also fond of our colleague Glenn Paulley’s recent presentation, “ORMs: Friend or Foe?”, which can be found and downloaded from his presentations page.

I’ve written my own “poor man’s ORM” solutions in the past to facilitate object generation from a database result set, but have yet to fully embrace the latest generation of ORM technology. Like many developers, I’m a control freak and I love my database. Putting a middle man and smoke and mirrors between us is not fun for me. However, reducing the need to crank out endless lines of redundant data access code certainly is appealing. For writing simple applications, I really like the idea of using an ORM to just “get the job done”.

I wish the Advantage team had the resources to support all of the ORM’s currently available, but that just isn’t possible. I could name at least 7 off the top of my head, and I bet with 5 minutes of web searching I could easily find another 10.

I’m also concerned about the long term maintenance requirements. Supporting ORMs is not as basic as providing an interface to our database. We then have to deal with optimizing overly complex queries generated by the ORM (see Glenn’s presentation), record locking and visibility issues, transaction issues, etc.

For now we support the .NET Entity Framework. Hibernate and NHibernate are on our radar, but no decisions have been made yet to move forward with solutions for those frameworks. There are feature requests for both on our feedback page. I’d encourage you to vote for those or submit your own requests. Also please feel free to comment on this post to share your insights or thoughts.