Home

WTF is a Package Manager?

A brief description of package managers, with some examples using referencing JavaScript packages.

A package manager is a collection of distributed software. I like to think of it as a giant repository of plugins — code libraries that don't come native to an environment or programming language, but provide some functionality on top of it.

For example, consider a JavaScript library like Lodash. It offers a collection of utilities to the JavaScript programming language. One example is its last method in which it returns the last element of an array. JavaScript doesn't offer this by default. I could write my own function to handle extracting the last element of an array, or I could install the Lodash library to handle that functionality for me.

But packages can be much more complex. For example, a server-side language may have packages that handle authenticating users for an application.

One benefit of using well-maintained and distributed packages is that they are supported and tested by the community. That means you can grab solid, stable code that just works, and write less code for your project.

A package manager typically works in conjunction with a registry or a place where packages are hosted. These may both be supported by the same provider or may be separated. For example, with JavaScript, NPM is both the package manager (the command-line tool) as well as the registry. But there are other package managers for JavaScript, like Yarn, which handle just the command-line portion, but use NPM as the source (the registry) for the packages they install.

Let's Connect

Keep Reading

WTF is JavaScript?

A brief description of JavaScript, with a few links to dig in and learn more.

Jun 29, 2020

WTF is Lodash?

Explore an introduction to Lodash and what it can do to support your JavaScript code.

Apr 21, 2020

WTF is a Web Component?

What are components? What makes them different from (or similar to) HTML elements? How are they being used today? Let's find out.

Jun 30, 2020