/ / Framework vs Library: What Is the Difference?

Framework vs Library: What Is the Difference?

Framework vs library

A framework and a library are both reusable codes written to shorten development time. 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.

In other words, a framework 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 part of an app’s add-on feature.

In other words, a library 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.

Note that it is not compulsory to use any framework or library for your app’s development.

However, a couple of back-end codes are challenging to implement without frameworks — for instance, HTTP server, URL routing, and Web security.

Therefore, while you may develop front-end interfaces without using frameworks, back-end coding is faster, easier, and much efficient with back-end frameworks.

Examples of frameworks and libraries

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

Examples of front-end frameworks

Typical front-end frameworks are Bootstrap, Semantic UI, Vue, and Angular.

Examples of back-end frameworks

Common server-side frameworks are Express (NodeJS/JavaScript), Spring (Java), Django (Python), Laravel (PHP), and Ruby on Rails (Ruby).

Note

In parentheses are the scripting languages of the frameworks.

Examples of libraries

Typical examples of libraries are React, Lodash, ChartJS, and jQuery.

Summary

Framework and libraries are codes pre-written by someone else, which you can use alongside your own code. The main difference between the two is this:

  • A framework is a codebase written to serve as the primary structure for your application.
  • A library is a codebase written to act as an add-on feature to your application.

Useful Resources

Credit

Featured Image by Diana

Get Notified of the Latest Publications

Similar Posts