The State of Front-End Package Management

Scott Hanselman just introduced support for front-end build tools grunt, gulp, bower, and npm on his blog. Visual Studio is going to have support for front-end build tooling and package management. As Scott mentions, there still is possible use cases for using NuGet to distribute front-end assets.

However, I think not using any package management for front end assets is OK for the most part. I’m actually not a big fan of tools like require.js either. While it encourages people to structure their JavaScript better, we shouldn’t be wrapping all our JavaScript code in framework specific “define” methods. Now your entire app is coupled to require.js. Justin Searls talks about this in the latest episode of the changelog: http://thechangelog.com/128/.

Just because NuGet is a lifesaver and huge optimizer for managing third party dependencies doesn’t mean tools like bower will solve your front-end dependency management woes. For one, pulling in new JavaScript is not hard. Perhaps it is too easy. Second, if you have to use a tool to manage your dependencies in JavaScript – you’re probably running a little fat on the client anyway and need to go on a diet. Lastly, I don’t think the trend will ever go away from directly including third-party JavaScript, as opposed to maintaining a “lib” folder for .dll dependencies.

Author: Craig Smitham

Craig Smitham works for Pariveda Solutions building computing solutions for the web, mobile, enterprise and cloud.