What does vendor mean?

Asked

Viewed 3,547 times

2

A folder with a name vendor is commonly used in web projects. See some examples: rklet, ytd.

What is the purpose and importance of this folder? Why does it have that name?

1 answer

8


In fact, the directory vendor is related to applications developed by third parties that compose the requirements of their application.

What is a 3rd Party and its importance for the development of traditional applications?

This directory has no direct relationship with Laravel, as commented in the other answer. In PHP projects this directory is quite common because it is the directory in which the Composer, PHP dependency manager, uses to organize third party codes.

The first project as an example, rktlet, uses the package management system Glide, which also defines the directory vendor to store dependencies. The second project, ytd, seems not to use any management system, but still uses the directory vendor by choice, following the customs of the community itself.

In short, the directory vendor usually stores third-party project dependencies - that’s how most package managers work - but there’s no guarantee of that. Projects can exist using the directory vendor even though this has no relation to the dependencies. I can very well store my Javascript files from my page in a directory vendor. It works, it can only get a bit messy and therefore such a practice is not encouraged.

  • Cool. Can you clarify one more question? It makes sense to commit to the folder vendor since the Packages.json file already describes the necessary dependencies that can be installed using the package manager? For example, with Packages.json in the folder just run the npm install, in the case of this manager.

  • 1

    So if you’re using a package manager, it doesn’t make sense. Since the file itself already describes all dependencies, don’t "commit" the directory vendor greatly reduces the payload of the application.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.