Logo

dev-resources.site

for different kinds of informations.

Library v/s Framework

Published at
7/16/2024
Categories
library
framework
frontend
spring
Author
sourav_codey
Categories
4 categories in total
library
open
framework
open
frontend
open
spring
open
Author
12 person written this
sourav_codey
open
Library v/s Framework

Ever confused between library and frameworks ???


Do you also get confused about these two and used these two terms interchangeably.
Let me help you understand these two so you will have a better clarity.


First, lets start with definition:

Library

A collection of predefined methods, classes or interfaces used for solving common problems.
It comes either bundled with a language or can be downloaded from internet and used.

Examples - react.js, twilio, iText, apache commons and lot more.

Benefits of using library:

  1. Reusability
  2. Reduces programmer's effort
  3. Allows programmer to focus on main problem

Framework

A collection of libraries is called framework, it provides a foundation on which we develop our code.
It provides pre-written common logics so that developers can focus on business logic only also called components.

Frameworks can be further divided into following sub categories:

  • Frontend framework
  • Web framework
  • Application Development framework
  • ORM framework

Examples - angular, spring, hibernate, struts and more.

Benefits of using framework:

  1. Speeds up development process
  2. The code is more secured than library
  3. Forces developers to follow standard procedures and hence make our code clean and therefore is opinionated

Difference between library and framework

  1. Libraries are lightweight whereas frameworks are more bulky.
  2. Libraries are more flexible than frameworks.
  3. Frameworks call our code whereas we developers call library methods or functions.
  4. Frameworks employ the concept of IoC(Inversion of Control) where framework tells developers how to write the code.
  5. Frameworks controls the flow of application but we can use force library to control the flow of application.
  6. Libraries are more flexible than frameworks.

Conclusion

I hope you know the difference and advantages and disadvantages of using libraries and frameworks πŸ—οΈ.
If, you want to develop overall architecture of an application by using best practices and standards, you can use framework but if you want to develop application at a greater pace with your own custom logics and control flow on your own, you can use library πŸ“š.


Follow me on Twitter for more.

library Article's
30 articles in total
Favicon
Why I won't use querySelector again.
Favicon
The Ultimate PHP QR Code Library
Favicon
React-toastify v11 - finally easy to customize
Favicon
Automating Arduino Library Deployment with GitHub Actions: Version Validation, Pull Requests, and Release Automation
Favicon
microlog 6: New feature – Log Topics
Favicon
New Release: microlog 5.1.0
Favicon
Best React UI Library: 5 Popular Choices
Favicon
THE DIFFERENT BETWEEN LIBRARY AND FRAMEWORK AND NOT USING BOTH WITH REAL LIFEΒ  ILLUSTRATIONS
Favicon
How to Convert PDF to Text in Python (Full Tutoiral)
Favicon
Library v/s Framework
Favicon
Export data from Django Admin to CSV
Favicon
Design a Multiple-Chart Plotting Library
Favicon
Teach you to design template class library to get K-line data of specified length
Favicon
Oxylabs Python SDK
Favicon
How to Convert HTML to PDF in Python (Full Tutorial)
Favicon
Struggling with Brand Icons in Web Development? Try Simple Icons!
Favicon
The development of CTA strategy and the standard class library of FMZ Quant platform
Favicon
Comparing Vue Component Documentation tools
Favicon
Why write a library?
Favicon
Introducing Bag 1.0: Immutable Values Objects for PHP
Favicon
Introducing EventSail: A Python Library for Event-driven Programming
Favicon
Introduction to NumPy
Favicon
Best Icon Libraries for a Dev in 2024
Favicon
Light Localization for PHP - Translations
Favicon
SciChart is the fastest JS Chart library available
Favicon
Java library for RuTracker
Favicon
Guided Tours Solution for Your Web Application
Favicon
Exportar tabla con JQuery
Favicon
RGFW | Singler-Header Lightweight framework for basic window and graphics context handling (like GLFW)
Favicon
An expression parser for MiniScript

Featured ones: