Package Manager vs Dependency Manager

后端 未结 2 855
心在旅途
心在旅途 2021-01-30 17:28

What are the differences?

In many places they used interchangeably as synonyms but I think they are different. What is the key difference in short?

相关标签:
2条回答
  • 2021-01-30 17:53

    TLTR: Package Manager is used for SYSTEM and Dependency Manager for PROJECT


    Package Manager - is used to configure system, ie to setup your development environment and with these settings you can build many projects.

    Dependency Manager - Is specific to project. You manage all dependencies for a single project and those dependencies are going to be saved on your project. When you start another project you should manage your dependencies again.


    EXAMPLE: In PHP world there is COMPOSER as dependency manager and PEAR as package manager. When using composer all your settings and extensions are for single project where pear settings to setup new extension and library to php core.

    0 讨论(0)
  • 2021-01-30 18:11

    There is an excellent and simple explanation on Composer's website:

    Composer is not a package manager in the same sense as Yum or Apt are. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default it does not install anything globally. Thus, it is a dependency manager.

    0 讨论(0)
提交回复
热议问题