I had a hard time finding an overview of the differences between component and bower. Which one is better, what is the better package manager to use? Are there any alternatives to these two I should consider?
-
I kind of found my answer here: http://dailyjs.com/2013/01/28/components/. A discussion can be found here: https://groups.google.com/forum/#!msg/componentjs/FGM46qQX9hs/zOryL24q1AcJ – Yoshua Wuyts Feb 20 '13 at 21:58
2 Answers
A "component" is a part of a system. Bower is package manager.
Which one is better? Read the Bower FAQ for differences.
Bower seems to make better what it aims for, that is a package manager for the web.
There are also Jam, Volo, or Ender. And of course, NPM.
For popularity and adoption check, you can check Ohloh
UPDATE:
Component package manager https://github.com/component/component is also a package manager for the web. It uses GitHub as a back-end database for modules, so modules that are not on GitHub will not be listed. This approach however makes things easier, as there is no need for additional credentials; authors just use GitHub.
Personally, I think Component should adapt a distinctive name, so that it would be not confused with the general word "component."

- 7,325
- 6
- 42
- 71

- 60,022
- 51
- 208
- 332
-
13"Component is part of a system." Based on this statement I don't think Joe understands the question. Yoshua is referring to https://github.com/component/component , a competitor to Bower. – Eric Drechsel Dec 07 '13 at 02:11
-
6For half a year the question was understood in the same way (6 votes up). Component package manager has ambiguous name. – Paul Verest Dec 10 '13 at 07:20
The team behind component have now written their own opinionated answer to this: https://github.com/component/guide/blob/master/component/vs.md#component-vs-bower
Copying the content as of today:
Bower is more similar to
npm
than to Component. Likenpm
, Bower'sbower.json
manifest is inclusive except for everything in the relevant.ignore
file. Component, on the other hand, is exclusive, downloading files only specified in thecomponent.json
.However, the major difference between Bower and Component is that
component.json
s are more strict and opinionated: all files listed in thecomponent.json
are assumed to be mandatory. On the other hand, files listed in abower.json
are generally optional.A strict manifest specification allows Component to easily integrate a build process. However, this is impossible with Bower as people publish different types of modules (globals, plugins, AMD, and CommonJS), as well as optional files as shown in this react-bower issue, making an integrated build process very difficult.
Component's integrated build system allows you to simply include one script and one stylesheet in your page. There's no juggling
<script src="bower_components/jquery"><script>
calls and such.Like
npm
,bower
is slower than Component at installing, has an unnecessary publish step, does not support multiple versions of dependencies, and does not cache installations.