What is software library?

A library is a reusable set of code which software developer can use as it comes from its creators. Library usually focuses on a narrow set of functionality, which user accesses through an API. It performs specific, well-defined operations. User calls a library function, it executes some code and then control is returned to developer's code. Usually, it does not provide any hooks for developer to extend or override its behavior.

While a software framework is a platform, which setups the architecture for whole project, library is just a handy tool to deal with particular problem. For example, you need functionality to display popup windows on your website. Instead of writing many lines of your custom JavaScript code, you can use third party library, such as jQuery UI or popup.js.

Short answer

  • Software library is a handy tool, reusable set of code, which software developer can use in his application to solve particular, well-defined problem.