views:

160

answers:

4

I have mixed views about commercial class libraries. Am I better off using a commercial class library or starting from scratch? If buying a library is the way forward which one for a C# developer?

+8  A: 

Put a value on your time, say $30 an hour. Estimate how long it would take you to write the library, then add two times that for debugging and testing. Subtract the time it's going to take you to learn how to use the commercial library with the given documentation. Multiply by your hourly rate. Compare.

Writing a library can be fun and rewarding, but "not invented here" syndrome keeps a lot of companies from creating anything useful, as they're stuck reinventing the wheel for additional cost. Make sure it is extensible (if you don't get access to the source) and has what you need. Buy it.

As a personal project, it's probably worth writing it from scratch at least once to see what you can learn, but on company dime you need to be productive and efficient.

Or write it from scratch and release it open source ;)

Stefan Mai
+6  A: 

I really think you are missing out the most important strategy:

  • Use open source and contribute changes back to the community.

I have seen lots of commercial software integrations go bad, usually because of real-life demands that are not met by the commercial product, many of which you do not discover until you are deeply committed (oh, so you wanted search to NOT have an upper limit of 1000 responses? No, we can't do that...)

If these things happen to you with open source, you at least always have the option of forking.

krosenvold
Good answer, I was about to point out the third alternative too... :-)
PhiLho
+2  A: 

Always use a good quality library wherever possible - but only if you can have the source code. Experience tells me to not use anything that I can't have the source for.

Also - depending on what the library is, it is sometimes sensible to have a layer on top of it so you reduce dependencies, thus making any future replacement of a library easier.

Richard Harrison
A: 

That depends on your goals. If you want to experiment and learn about a certain framework feature it makes sense to try to implement it.

However, if you're trying to make money (or fame or whatever) on your software, you should ask yourself how to best spend your time. How much value do you add to the application by implementing yet another Linked List? Probably not a lot, so use whatever good implementations available. On the other hand, you could add value to your application by implementing a very specific graph control (although there are plenty on the market). So look at it from a return on investment point of view.

Brian Rasmussen