Why Bower (+ Gulp) is better than Nuget for client-side libraries

I usually used Nuget to get all libraries needed for my projects, until I know Bower. Nowadays I still use Nuget for backend libraries, but I switch to Bower for frontend.

This article explains nicely why Bower is better than Nuget.

Apart from all the reason mentioned on that article, personally these are why I prefer Bower

  1. When using Nuget, all files needed are placed and referenced nicely in the project. This is very helpful for backend project. But for frontend, this might get annoying. Every people have their own way to structure their project. For example, some people might place Font folder in a root project, while others prefer to put it inline with CSS files.
    When we reference different nuget libraries from different contributors, the project structure might get messy. And personally I don't like it because it makes the project harder to read.
    With Bower, all packages are installed in the same folder. So it's up to us to decide which files that we need and how do we want to structure. And with the help of Gulp, we can easily copy,bundle,and minify the file.
    And If we need to modify the library codes before referencing it for whatever reasons, we can easily do that with Gulp without affecting the library itself.

  2. Community Support. Whenever I need a library, I always see that the developer provide Bower package, and unfortunately most of them don't really support Nuget. Of course there are other devs who are very helpful to upload it to Nuget, but we can't really rely on them because they are not directly supported by the developer itself. So there might be issues, like the package version in Nuget is out of date, or it might even contain malicious codes

Furthermore, Visual Studio has great extensions to support Bower and Gulp. You can read more details about it here

Abdurrachman Habibi

Read more posts by this author.