library

/ˈlaɪ.brər.i/noun

A library is a collection of reusable software code for a defined task. An application can call that code to use existing functionality.

The application uses an existing library to handle dates.

A library contains code that developers do not need to rewrite for every application. It might provide functions for handling dates, creating charts or validating input. The application imports the required parts and calls them where that functionality is needed.

How do you use a library?

A developer usually adds a library as a Glossary · In briefdependencyA dependency is a software component or system that other software needs in order to build or run, such as a library, framework or external service.Read more. Application code then uses its functions, classes or Glossary · In briefcomponentA component is a distinct part of software with its own task and a clear way of interacting with other parts.Read more through the library's interface. This lets the team build on existing solutions and focus on the product's own logic.

A library remains part of the software you maintain. New versions may fix bugs or add features, but can also change its interface or behaviour. Teams often pin the version they use and test updates before deploying to production. They also check whether the library is actively maintained and known vulnerabilities have been fixed.

Library, package and framework

Library and package are often used interchangeably, but describe different things. A package is the unit in which software is distributed and installed. It can contain a library alongside configuration, documentation or other files.

A Glossary · In briefframeworkA framework is a coherent foundation for software development, providing reusable code, a defined structure and conventions for building an application.Read more usually determines more of an application's structure and execution. The application fills in designated parts. With a library, the application retains control and calls only the code it needs. The boundary is not always clear: a single software package can have characteristics of both.