What is the difference between frameworks and libraries

Hansani Hirunika Bandara
4 min readFeb 26, 2022

What is framework

A framework is a foundation upon which you may construct software. It acts as a foundation, so you won’t have to start from scratch. Frameworks are usually coupled with a programming language and are suitable for a variety of activities.

Assume you’re constructing a home. You might lay your own foundation and frame the house. You could accomplish it, but it would take a long time. But if all of it was already taken care of for you, it would save you a lot of time and work — especially if it was done by professional house builders.

A framework performs a similar role in software development. Other Software Developers and Engineers built and tested it, so you know it’s a strong foundation.

However, a home isn’t complete without the framework. In software development, a framework is a starting point, but you must add higher-level functionality to make it work.

We’ll look at frameworks in more detail below, including what they’re used for, the distinctions between libraries and frameworks, and more.

Java script framework

A JavaScript framework is a collection of pre-written code designed to assist applications and give features that plain JavaScript lacks.

Consider a tent if the concept of frames is still unclear. You construct a frame for the tent’s framework. Then you may decorate the outside and interior of the tent with whatever you desire. Of course, JavaScript frameworks aren’t as substantial as our tent, but the notion is the same.

JavaScript libraries are collections of code that are tailored to various scenarios.

Day.js, for example, is a package dedicated to making it easier to use dates in JavaScript, which may be difficult even for experienced programmers. jQuery is another famous JavaScript library, which simplifies the syntax for DOM traversal, event handling, animations, and other common tasks.

Frameworks, on the other hand, are designed to perform various tasks and serve as the foundation of a web application. Angular, for example, architects the full site tree. That is, they are utilized for the whole application’s front end. Others, such as Vue.js, allow for incremental use, which means your app may only use the framework in small quantities.

Popular java script frameworks

  • Node.js.
  • React.
  • Vue.js.
  • Angular.
  • Ember. js.

What is library

A library in computer programming is a collection of files, programs, routines, scripts, or functions that may be accessed in the code. These libraries are more complicated than routines, and they are often built by the same programmers who created the programming language.

When developing software, a “library” is a collection of program pieces that do common and/or specialized tasks, saving the programmer from having to “reinvent the wheel.” It mainly comprises of calling functions and instantiating object types. Functions dealing with dates and timings are a frequent example, whereas software for controlling a smart thermostat is a specific one (such specialized libraries are typically provided with a device purchase).

The programmer may concentrate on the unique characteristics of the application being built by utilizing libraries.

Popular java script libraries

  • JQuery library.
  • React library.
  • D3.js library.
  • Underscore library.
  • Lodash library.
  • Algolia Places library.
  • Anime.js library.
  • Animate On Scroll library

Java script library

A JS library, in general, is a reusable piece of code with a single primary use case. Depending on the language, a library can have several functions/objects/methods. To gain access to that functionality, your application might “link” to a library. For specific pieces of code, JavaScript libraries eliminate the need to reinvent the wheel. As a result, development is faster and easier, with fewer mistakes.

There are over 83 JavaScript libraries available, including TensorFlow for machine learning, Meteor for quick prototyping, Three.js for dynamic 3D graphics, Dojo Toolkit for DOM manipulation, and more!

Difference between library and framework

Wrapping Up

A framework is a foundation upon which you may construct software. Frameworks are usually coupled with a programming language and are suitable for a variety of activities. We’ll look at frameworks in more detail below, including what they’re used for, the distinctions between libraries and frameworks, and more. When developing software, a “library” is a collection of program pieces that do common and/or specialized tasks. As a result, development is faster and easier, with fewer mistakes.

A library can have several functions/objects/methods. To gain access to functionality, your application might “link” to a library.

--

--