Bower: Modern Tools for Web Development

Adam Tuliper. MSDN Magazine. 2015-10-01.
For a long, long time, we lived in a beautiful walled garden. In this protected ecosystem of Web development, we used sophisticated technology like ASP.NET and Visual Studio. The rest of the world’s tools were considered rather inferior. We were part of an empire, if you will, and it was a pretty good place to be for a long time.
However, as time has passed, development cultures, tools, resources, and more have become fragmented and even chaotic. But some pretty solid tech has cropped up during this period, including Bootstrap, AngularJS, Git, jQuery, Grunt, Gulp, and Bower, and Web developers accustomed to the Microsoft ecosystem are able to take advantage of these tools.
In this first part of a two-article series, I’ll provide an overview of Bower, a package manager primarily for (but not limited to) front-end Web development. In the second article, I’ll cover Grunt and Gulp, two JavaScript-based task runners that can be used to perform all sorts of tasks, like copying files, minification, concatenation, and even compilation.
Grunt, Gulp and Bower are additional tools in your Web development arsenal. Tooling to integrate with them is built into Visual Studio 2015 and available via add-ins for Visual Studio 2012 and 2013. You still need to install them.

[Bower: Modern Tools for Web Development]



Web sites are made of lots of things — frameworks, libraries, assets, and utilities. Bower manages all these things for you.
Keeping track of all these packages and making sure they are up to date (or set to the specific versions you need) is tricky. Bower to the rescue!
Bower can manage components that contain HTML, CSS, JavaScript, fonts or even image files. Bower doesn’t concatenate or minify code or do anything else – it just installs the right versions of the packages you need and their dependencies.
To get started, Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you’re looking for. Bower keeps track of these packages in a manifest file, bower.json. How you use packages is up to you. Bower provides hooks to facilitate using packages in your tools and workflows.
Bower is optimized for the front-end. If multiple packages depend on a package – jQuery for example – Bower will download jQuery just once. This is known as a flat dependency graph and it helps reduce page load.