Depending on another open source library: copy/paste code or include

Posted by user5794 on Programmers See other posts from Programmers or by user5794
Published on 2011-01-07T07:23:46Z Indexed on 2011/01/09 10:58 UTC
Read the original article Hit count: 217

Filed under:
|
|
|

I'm working on a large class and started implementing new features that need graphics. I started writing the graphics functions myself, but I know that open source libraries exist that can provide me with this functionality without me having to write it myself.

The problem is that I prefer the class to be self-sufficient and not dependent on any other library. If I don't write it myself, I would have to ask the user to make sure a graphics library is already installed (less user-friendly). If I write it myself, I do a lot more work than I have to. I could also copy/paste some of the relevant code into my own class, but not sure about the disadvantages of doing this (it's an open source library that matches my license, so I'm not concerned with legality, just programming-wise if there are disadvantages).

So what should I do:

  • copy paste code from the external library
  • write the code myself so it's truly self-sufficient
  • ask the user to download and install another library

© Programmers or respective owner

Related posts about php

Related posts about graphics