0

I'm writing a JavaScript graphing library using canvas which I am licensing under MIT, and I'm using jQuery, as well as a couple of other open sourced libraries, all under MIT. I'm also using bower to manage my front-end dependencies. How should I best handle these dependencies without violating the license?

Preferably, the user would not have to include multiple scripts, just one <script src = "graph.js></script>, and it would include all of the plugins.

Should I just ask the user to include jQuery and the other libraries in its own script tag, or should I concat all of the scripts together into one big file, headers included?

1

How should I best handle these dependencies without violating the license?

If you would packaging your dependency modules, you should only ensure to mantain the MIT requirements

The MIT License is a free software license originating at the Massachusetts Institute of Technology (MIT). It is a permissive free software license, meaning that it permits reuse within proprietary software provided all copies of the licensed software include a copy of the MIT License terms. Such proprietary software retains its proprietary nature even though it incorporates software under the MIT License. The license is also GPL-compatible, meaning that the GPL permits combination and redistribution with software that uses the MIT License.

 

Should I just ask the user to include jQuery and the other libraries in its own script tag, or should I concat all of the scripts together into one big file, headers included?

I think its completely up to you, but I think the user have not problems to include JQuery if they would use Bootstrap

0

Ignoring licensing, it is generally preferable to provide at least one version of your script that includes none of its external dependencies. Some libraries include a wide variety of wrappers and bundles (e.g., HistoryJS) to make things easier on their users.

  1. Complicated sites may or may not already include dependencies (and not necessarily the same version you'd include).
  2. Users may wish to update your script without updating their other dependencies.
  3. Popular dependencies are available on large CDNs. Users may prefer to download such dependencies from these CDNs, to leverage cross-site caching (i.e., users of my site can avoid downloading JQuery if both myself and others link to a copy on Google's CDN).
  4. It's less effort to concatenate dependencies into a script than to split a script apart (and users who wish to do so may very well be using a framework which does so automatically).
-1

There are two important factors you did not mention.

  1. Do you want to retain copyright for future benefit to you, or is this purely community?
  2. Do you want to make money out of this, or will you compete with someone who does?

The basic breakdown is this. If you make no money out of it and harm no-one then just do your best, acknowledge the work of others and don't worry too much. Distribute your code any way that makes sense to you, including dependencies if you like. No-one will be harmed and the community will love you. Don't sweat it. If you need to do something different, wait until someone tells you and then talk to them.

If you make money out of your product or services and/or if you may cause damage to someone or compete with someone who does, then you must take competent legal advice. That won't protect you, but it will warn you about the risks and possibly help to mitigate them. You are at risk, even if you don't realise it, and the more money you make the bigger the risk.


The point of this answer is that you should worry far more about whether you code is valuable to others, whether you are contributing to the community and whether you are likely to upset someone than you should worry about the nuances of wording. You cannot get it exactly right without a lawyer but you don't need a lawyer to 'do the right thing'. Do your best, and get on with what you do best: writing code.

  • Part of being a good citizen is being careful about licensing. Sure, the author of a FOSS project probably won't be attacked legally, but those who wish to use such code legally will have a much easier time of it if the author handles licensing properly. – Brian Jul 21 '14 at 18:58
  • @Brian: After careful thought, I disagree, and I think the downvote is misplaced. See edit. – david.pfx Jul 21 '14 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.