Software Frameworks and Libraries
What is a Software Framework?
In computer programming, a software framework is a standard way to develop software programs. Software frameworks have generic implementations or abstractions, so developers can follow the standards introduced by the framework. It is reusable within the same program or different programs.
What is a Software Library?
In computer programming, a software library is a reusable collection of programs used to make developers' lives easier. Since it is reusable in different programs, developers don't need to implement common logic again and again.
Difference Between Framework and Library
Inversion of Control
- Framework: All the program flow is controlled by the framework. The framework calls your program (IoC).
- Library: Your program decides when to call the functions of the library.
Abstraction and Implementation
- Framework: Provides a collection of abstract interfaces. Developers follow the template to use the framework.
- Library: Provides a collection of implementations that can be reused directly.
Examples
Frameworks:
- Spring
- Struts
- Angular
- React (often considered a library, but acts like a framework in ecosystem)
Libraries:
- Oracle JDBC Driver
- jQuery
- OpenCV