Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module vs. Dependency vs. Library vs. Package vs. Component

I understand that packages hold several modules, but I'm starting to get confused as to if packages and modules are dependencies. Also, libraries to me maybe seem like packages you install via NPM, Nuget, RubyGems, Bower, Homebrew, or Chocolatey. So are libraries packages? Dependencies are something you need to load within your application, to have a certain functionality, but aren't some libraries(jQuery) seen as a dependency? So yea, what are the differences between these concepts?

like image 990
Jake_West Avatar asked Jan 09 '18 18:01

Jake_West


People also ask

What is the difference between a library and a dependency?

Typically, a library is also something that is not executable, but requires the consumption. A dependency, like the earlier answer suggested, is a relationship between two pieces of code. The first code calls out to the second code to either perform an action or return some information.

What is the difference between a library and a module?

A module is basically a single purpose library. A library contains many modules (a module is usually packaged as a single . jar file). A library can contain many modules, but they are usually all connected by some theme.

What is the difference between Python module package and library?

The package is simply a namespace. The package also contains sub-packages inside it. Library: The library is having a collection of related functionality of codes that allows you to perform many tasks without writing your code.

What is dependent library?

Dependency on libraries. If a module or mediation module needs to use resources from a library or if a library needs to use resources from another library, you have to open the module or library with the dependency editor and add a dependency on the required library.


1 Answers

Libraries are just a bunch of code anyone can use. For example, React.js is a JavaScript library for building front end components.

If I decide to use this library in my app, then React will become one of the modules (aka an installed instance of the library) that my app depends on. So dependencies are pretty much all of the libraries your app depends on, in order to run the way you expect it to run.

I asked the same question you did about dependencies, and I learned that it's a matter of understanding how these terms relate to one another rather than finding isolated definitions for each of them.

Hope this helps!

like image 174
seemcat Avatar answered Oct 05 '22 11:10

seemcat