What is a Library?
A collection of predefined methods, classes or interfaces used for solving
common problem.
Come either bundled with a language or can be downloaded from the internet
and used.
Examples of Libraries:
Standard Libraries: [Link], [Link], [Link]
3rd Party Libraries: apache commons, twilio, iText
Benefits of Library:
Reusability
Reduces Programmer’s efforts
Allows a programmer to focus on main problem.
A Real-Life Example: Imagine, a chef needs to make a Pizza
What is a Framework ?
Collection of multiple Libraries.
Provides foundation on which we can build our code.
It provides pre-written common logics so that we can focus on business logic
only.
Provides reusable components
A Real-life Example: Imagine, how DOMINOS makes Pizza ?
Library Vs Framework:
Libraries are focused to a specific task only while a framework has a wide range of
functionality and used to build complete application.
Our code calls the Library, while in case of framework it calls our code.
Benefits:
Speeds up Development Process
Secure
Forces us to follow standard programming practices and thus make our
code clean.
Web Application Architecture:
US
USER
INTERFAC WE BU DA
WEB
LAYER
BUSINESS
LAYER
DAO
DA
DATABASE
E
ER B SIN O TA
Backend
Frontend
Application Application
Types of Frameworks: