1

Using JS as an example here, if I am creating a library/plugin, and intend to make it available to others, should I keep it in Javascript? Or would jQuery be an acceptable dependency? At what point does the ease and added control of coding in jQuery outweigh the potential inconvenience of someone else having to include something they might not have wanted? Or, if like jQuery, the dependency is a very common library already included in most projects already, is it considered fine to use it as a foundation?

Note that I am not asking about something extending something else, but simply using the pre-existing code to program an entirely different library/plugin.

1 Answer 1

1

You should try to use as few dependencies as possible.

Lets say I want to use your great new library, but also another library which uses.. i don't know, mootools. now my project has to have both libraries.

Lets say someone else wants to use my great project, but they are also using one which has a dependency on... erm knockout. now they have to include knockout, mootools AND jquery

Let say a 4th person wants to use... etc etc

2
  • 1
    Let us not forget version dependencies - Great New Library needs jQuery 1.11 but hasn't been tested on anything newer. OtherCoolLibrary needs jQuery 2.1.4 and nothing older... Commented Nov 17, 2016 at 16:47
  • 1
    STOP MAKING ME THINK ABOUT JAVASCRIPT!! :'( Commented Nov 17, 2016 at 16:51

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.