Skip to content
Latest: JSX in React explained clearly without any framework

Framework vs Library – What Is the Difference?

A framework and a library are reusable code written to shorten an app’s development time. They are code pre-written by someone else, which you can use alongside your own code. However, they both have subtle differences.

What Is a Framework?

A framework is a ready-made skeletal structure used as an app’s primary support system. It is like your skeleton, which is the primary support system of your body.

Framework and library depicted with a skeleton and a woman's
cloth.

Your skeleton is your body’s framework, while your cloth is your body’s library. Image by Lothar Dieterich

What Is a Library?

A library is a modular tool used as an app’s add-on feature. It is like your cloth, which you use as an add-on feature on your body.

Advantages of Frameworks and Libraries

Frameworks and libraries help quicken an app’s development process by providing pre-written functionalities you would have implemented from scratch.

Using a framework or library for your app’s development is not compulsory. However, some back-end codes—for instance, HTTP server, URL routing, and Web security—are challenging to implement without frameworks. Therefore, while you may develop front-end interfaces without using frameworks, back-end coding is faster, easier, and much more efficient with back-end frameworks.

Examples of Frameworks and Libraries

There are numerous types of frameworks and libraries. Below are a few good ones.

  • Front-end frameworks: Bootstrap, Semantic UI, Vue, and Angular
  • Back-end frameworks: Express (NodeJS/JavaScript), Spring (Java), Django (Python), Laravel (PHP), and Ruby on Rails (Ruby). Note: In parentheses are the scripting languages of the frameworks.
  • Libraries: React, Lodash, ChartJS, and jQuery

Useful Resources