A programming library is a collection of pre-written code that developers can use. Libraries provide reusable chunks of code that can be used to create applications quickly and easily.
Libraries are targeted for specific, common problems and include different pre-coded components that can be customized to solve the problem for you.
For example, let’s say if you’re creating an application that allows people to login to a website. You might then use a library to create user authentication for logging in and connecting to your app. It might contain not only a login form and authentication for you to use, but an email verification module, some sort of make sure the new user is a human and not a bot, etc.
Libraries encourage the sharing of code in a modular fashion and ease the distribution of the code.
Library vs. Framework
The fundamental difference between a programming library and a framework lies in a term called inversion of control. When you use a library, you are in charge of the flow of the application. You are choosing when and where to call the library. You may even use multiple libraries in the same project, or even on the same webpage or screen. With a Framework, you have to follow their structure.
Types of Libraries
There are many different libraries that cover a variety of topics, problem domains, and languages.
You can find libraries for credit card processing, game mechanics, physics, data visualization, and more. You can even find simple libraries for working with different types of data, like JSON.
Often, if you find one library that does something, you will find another, and maybe another. JavaScript is known for having many similar libraries.
So, they don’t just work on the front end, but also back end as well. I’ve seen libraries available for most programming languages out there.
When looking for a library, you will want to test to make sure it works for what you are looking to do, as well as it matching the programming language that you are using.
It is not uncommon for a large project to use multiple libraries to make the development of code faster.
Sometimes you will develop your own library to use on a project. I’ve done this before if I thought I might need some specific feature used again.
It may be something that is specific to the organization you are working for, that you keep for future project. Or it might be something you will share this as either a paid or free resource that other developers can use.
I’ve used libraries written in, and for, JavaScript, Java, PHP, CSS, and C#. And those are the ones I can think of off the top of my head, not including the many others I’ve probably used over my development career.
What is a Software Library was originally found on Access 2 Learn
3 Comments
Comments are closed.