DIFFERENCE BETWEEN FRAMEWORK AND LIBRARY

Raushan Jha
2 min readMay 28, 2019

--

Library

A Library is a chunk of code that you can call from your own code, to help you do things more quickly/easily.

Why we need them:

The reason being very simple i.e. code reuse, use the code which has already been written by other developers.

Example:

A Bitmap Processing library will provide facilities for loading and manipulating bitmap images, saving you having to write all that code for yourself. Typically a library will only offer one area of functionality (processing images or operating on zip files)

Mobile Development:

Android:

Firebase ML Kit(Text recognition,Face detection,Language identification,Barcode scanning

Moshi:Moshi is a library that converts JSON into Java and Kotlin models

IOS:SWIFTYJSON

jQuery: A fast, small, and feature-rich JavaScript library.

React: Facebook’s JavaScript library developed for building user interfaces.

Python: (BeautifulSoup .Scrapy .matplotlib .NumPy)

FRAMEWORK

A framework is a big library or group of libraries that provides many services (rather than perhaps only one focussed ability as most libraries/SDKs do).

Example:

.NET provides an application framework — it makes it easier to use most (if not all) of the disparate services you need (e.g. Windows, graphics, printing, communications, etc) to write a vast range of applications — so one “library” provides support for pretty much everything you need to do. Often a framework supplies a complete base on which you build your own code, rather than you building an application that consumes library code to do parts of its work.

Web application system, Plug-in manager, GUI system.

Frameworks:

Web: Bootstrap: AngularJS Django Laravel Flask

Android

Xamarin PhoneGap NativeScript Ionic React Native)

KEYDIFFERENCE:

The key difference between a library and a framework is “Inversion of Control”. When you call a method from a library, you are in control. But with a framework, the control is inverted: the framework calls you. Source.

RELATION:

Both of them defined API, which is used for programmers to use. To put those together, we can think of a library as a certain function of an application, a framework as the skeleton of the application, and an API is connector to put those together.

--

--

Raushan Jha
Raushan Jha

Written by Raushan Jha

MOBILITY COE HEAD at Think AI Labs LLC.I love to teach the ways of Android & iOS through either java or Flutter.

No responses yet