26

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?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Yoshua Wuyts
  • 3,926
  • 1
  • 20
  • 16
  • 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 Answers2

10

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."

allanberry
  • 7,325
  • 6
  • 42
  • 71
Paul Verest
  • 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
  • 6
    For 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
4

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. Like npm, Bower's bower.json manifest is inclusive except for everything in the relevant .ignore file. Component, on the other hand, is exclusive, downloading files only specified in the component.json.

However, the major difference between Bower and Component is that component.jsons are more strict and opinionated: all files listed in the component.json are assumed to be mandatory. On the other hand, files listed in a bower.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.

Community
  • 1
  • 1
rgareth
  • 3,377
  • 5
  • 23
  • 35