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.