views:

314

answers:

9

Over the years, I've developed a bunch of re-usable code which I recently bundled up into a web application framework. Not only did I incorporate many open source solutions (smarty templating system, tinymce editor, prototype-scriptaculous libraries), but I also added my own custom-built features like CMS generation tools, social networking tools, blogging system, discussion forums etc...

I find that it takes me less time to build something new with my own framework than to study the plugins of another framework which may or may not do things "EXACTLY" the way the customer wants. I've been burnt in the past when I tried to integrate phpbb + wordpress + joomla into one seamless application. So instead, I've built my own framework which has plugins to the "essential" features of each of the mentioned platforms.

There are a lot of people out there who say "you should not re-invent the wheel". I generally agree. But the birth of my own framework is at odds with this rule, even though it's been extremely valuable to me in my freelance work.

What would you have done if a customer asks, "I want a website that has blog, discussion forum, paypal integration, social networking, newsletter mail outs, rating local restaurants on 5 star scale, regional business search and A LOT OF CUSTOMIZATION"? My own web application framework is in a better position to deliver such an application (because I built it and understand its capabilities) than wordpress or joomla.

So the question is, when should you re-invent the wheel?

+11  A: 

Joel has an opinion here.

duffymo
+1  A: 

Only when necessary :)

It really comes down to having an informed "make/buy" discussion with the necessary principals. If a 3rd party piece of software is more costly either in terms of time to learn, time to customize or purchase price, it might make sense to roll your own.

Kevin
+2  A: 

When you have a flat.

Chuck Conway
Good answer, but its kind of "take your own interpretation" kinds...
Mostlyharmless
I wouldn't reinvent for this case - I would just use the spare.
Software Monkey
+1  A: 

when you have a lot of free time and you think you can improve it

Oscar Cabrero
+2  A: 

When you can invent a better wheel.

Literally, rather than figuratively, the wheel has been invented and re-invented many times, improving it either generally, or more often, for specialised applications.

Figuratively, the same should apply.

Alohci
+1  A: 

When all that is available are squares. OK enough with the metaphors. It really depends on your time and budget constraints. If there are equivalents that you can use for free or at a cost less than that of the manpower, then do it.

The other thing to consider is that is you can spend some time to improve an open source piece of software to make it into exactly what you need. It will not only usually be cheaper than writing it from scratch, but you can then contribute that to the community and save someone else the time.

Zack
+3  A: 

When the time and resources for maintaining the existing wheel would exceed reinventing it.

Optimal Solutions
+1  A: 

That depends,

In our world almost everything is invented, if you have a new idea for an algorithm, a pattern, a way to do things you can go back to the 60's to the 80's an you'll probably find you idea there, expressed, implemented, proved and, possibly better than your own... so basically every new wheel is being reinvented.

Now, the first step will be asking yourself why are you planning on reinventing the wheel

  • Does it provide you with an advantage over the competence?
  • Does it removes a dependency over external code when that external code suppose a thread or a real inconvenience to your business?
  • Have the old wheel become so messed up that, though everyone knows what it does, nobody knows how? Is it important that you know how?
  • Does reinventing the wheel provide any kind of measurable improvement (different language compatible with what you are doing, performance improvements, etc)
  • Does the old code of the wheel smell? (You need at least two more developers to agree with you on this)

If you cannot answer at least one of that question with a clear yes I would say you shouldn't. If you can then ask yourself:

  • Does it fit your budget?

If it doesn't then don't do it. The most important thing is making profit, going on in the business, having a job ... I you can ... then go for it.

Jorge Córdoba