0

I am trying to modularize my PHP project so that some parts can be used in other projects too.

Obviously upon little googling I came across composer. Everywhere I look it is said that it's only a backend package manager. Then I looked up a frontend package manager and came across bower.

What I would like to know is why I can't use PHP for JavaScript management and the other way around. As far as I can tell, both libraries only copy my files to my project. Why do I need them both?

Chris Snow
  • 23,813
  • 35
  • 144
  • 309
Banana
  • 4,010
  • 9
  • 33
  • 49

1 Answers1

0

It's simple: because of context.
Most people don't share their packages in all package managers.

I'm a Node.js developer, and we have NPM, which is great. NPM have lots of frontend packages, however, there are some which are missing for the frontend development, or conflict (for example: https://npmjs.org/package/jquery - it's a Node version of jQuery).

Mainly because of this I do use 2 package managers for my projects, which are Bower + NPM. Frontend developers know Bower and submit their packages to him, but don't do that for other more "specific" managers.

If you're like me, you will not want to have to download your frontend dependencies manually and keep them in your repository, right?

gustavohenke
  • 40,997
  • 14
  • 121
  • 129
  • But wait, both Bower and NPM are frontend, i.e. JavaScript package managers. Why do you need them both? Do you use something for backend code? – Banana Aug 06 '13 at 12:19