Ayende @ Rahien

It's a girl

What would you say if I wanted to write my own... OR/M / IoC / Web Framework / Etc ?

Occasionally I get asked this question, and the answer I give is usually along the lines of: Why?

This is not a mocking question ( :-)  ), it is the criteria that I use to answer this question.

  • Are you doing it because you want to and it is fun?
  • Are you doing that to solve your own problems, and you decided that you will get better return of investment by building your own custom thing?
  • Are you doing it to solve a specific problem, without an off-the-shelf solution?

If it is any of the above, I would tell you to:

  • Have fun,
  • But look at the existing stuff first, see what the reasons for this is.

If it is something along the lines of:

  • Building it seems simpler than investing the time in learning how to use existing stuff
  • You have a policy of From-Vendor-XYZ-Or-Built-In-House
  • You need new challenges and haven't written a framework in a week or two

Then you really want to consider this twice or thrice.

I once had a client reject NHibernate and ask me to build their own custom OR/M implementation, because it didn't come from Microsoft, and they had a policy that all their stuff is either Microsoft or their own. NIH in its purest form. After showing some metrics about cost, supportability and bus factors, I have been able to convince them that this is not a really good idea, and they have been using NHibernate with great success for the last two years.

Jimmy Nilsson has some more thoughts about this subject.

Comments

Arnon Rotem-Gal-Oz
06/30/2007 05:11 PM by
Arnon Rotem-Gal-Oz

"I once had a client reject NHibernate and ask me to build their own custom OR/M implementation, because it didn't come from Microsoft, and they had a policy that all their stuff is either Microsoft or their own. NIH in its purest form"

Naah, I once worked in a place where I even had to code the standard (windows forms) buttons (hover effect and everything), menus etc :)

Arnon

Simone Busoli
06/30/2007 05:52 PM by
Simone Busoli

Well, writing something from scratch is probably a good way of learning something... the deal lies in avoiding to do it for everything!

Ayende Rahien
06/30/2007 05:55 PM by
Ayende Rahien

I am eagerly waiting to hear the reasoning behind that.

Was that on Windows, or some obscure UI platform?

John Rusk
07/01/2007 05:29 AM by
John Rusk

I started writing my own - but never finished it.

In terms of learning, and the satisfaction of doing something challenging and new, it was great fun. The difficulty was that, because it was going to take a significant amount of time, and because I have a family to provide for, I decided to try to earn some money from the exercise. This made everything more difficult (compared to just posting free code on my blog). In retrospect, it was inevitable that I should strike two problems:

(a) People want free stuff. I'm reminded of nDoc - far more widely used than my ORM ever would have been, but still not financially self-supporting.

(b) People want stuff from Microsoft, as above.

So yes, I wanted to do it because it was fun - and it was. I also wanted to do it because I thought I had some good, unique ideas. In terms of functionality (especially ease of use) I did believe it could compete with nHiberate in my product's target market (which was WinForms development). Now, we'll never know whether I was right.

I wonder how many people out there have good ideas in the ORM space, but can't afford the time to build them for free...

SimoneB
07/01/2007 09:03 AM by
SimoneB

In my opinion building them for free is not the way to go as long as you are alone, in terms of time, money and support from others. If you are still then the project is still. First thing I would do if I wanted to start a new OS project I would try to involve someone else into it.

Mats Helander
07/01/2007 01:30 PM by
Mats Helander

@ John

"I wonder how many people out there have good ideas in the ORM space, but can't afford the time to build them for free..."

Quite a number, I would imagine. But one thing I love about the "O/R scene" is that people actually share ideas in this space, meaning that you don't always have to write a new framework to see your good O/RM ideas become turned into reality, as long as you are willing to share them.

Many of the O/R / IoC / AOP etc frameworks that are doing well are developed by people who are doing it in large part in response to their fascination with the subject. Finding some such developer to discuss your ideas with should often be at least as feasible as writing your own framework to try your ideas. Put up a blog, blog about your ideas and you're bound to get interest from more than one framework developer. Or, in the case of open source frameworks, why not just download the bits and use them as your starting platform to experiment on and see if you can work in your ideas?

/Mats

John Rusk
07/02/2007 07:31 AM by
John Rusk

Thanks for the good advice Mats.

Comments have been closed on this topic.