Echo-ORM

I think we've all encountered the fear of open source software amongst some of our clients.  I like to call it ossphobia.  It basically amounts to a categorical rejection of anything that doesn't arrive in shrink wrap with a shiny holographic label displaying a Microsoft logo.  While I am primarily a Microsoft developer, I am by no means a fanatic and often find that the best solution to a problem is exactly the opposite of the solution championed by Microsoft.

Recently I was working with one such ossphobic client on a reletively simple reporting application.  We were in need of a very simple ORM-lite solution (similar to what SubSonic provides) to store meta-data information in a database.  My first thought was, "Well, why don't we just use SubSonic?"  This was met with blank stares and a palatable sense of "Oh no he didn't." hanging in the air.  So, after realizing that my chances of changing this client's mind on the subject of OSS was nigh impossible, I decided, "The hell with it, if they don't want to use the inexpensive solution, I'll just write my own ORM and call it custom software."

Some of you (whoever you are) will find the idea of rolling your own ORM in the age of NHibernate, LINQ to SQL, SubSonic, and etc. ridiculous.  "There are so many good frameworks out there, why would you ever want to write your own?"  Well, I'll give you a few reasons…you may not like them…but I do so you'll just have to deal.

  1. Full Control – One of the things that's great about SubSonic for example is that it just flat works out of the box.  You do some simple configuration, generate your objects, and your off and running.  Literally, 10 minutes.  The problem here is that much of the internals of SubSonic are kind of a black box.  The source code, while well written, can still be a pretty deep stack.  If I for example wanted to add a feature to SubSonic, I'd find the learning curve pretty high.  A custom ORM designed specifically for simplicity offers a much lower barrier to extension.
  2. The Right Tool for the Job – So in the specific case that prompted me to write my own framework, there were some specific features that we needed.  I was able to winnow down my concept to cover just what was needed at the time (the YAGNI principle).  This allowed my framework to be really targeted and the API that I exposed to consumers of the framework was extremely simple.  
  3. I Like Learning – I don't often get the chance to work on framework type projects so this gave me the opportunity to really try out some ideas in an environment that wasn't tied immediately to a project deliverable.  I think everyone should have a side project that takes them outside the path of their normal daily development…I have several such side endeavors.

So, now that all that's been said.  I'm introducing Echo ORM as an open source project on Google Code.  It's a very small framework and in a very alpha state, but I'd love some feedback on the approach that I've taken and I welcome comments or contributions.

Echo ORM: http://code.google.com/p/echo-orm

Category: Uncategorized Comment »


Leave a Reply



Back to top