Introduction
In the modern world, there is little a bit of confusion about the definition and the difference between a library and a framework.Since, most of the programmers are confused about the difference and the basic definition of both of these concepts, that would be a great advantage for anyone who is interested in programming.
So, throughout this article let's discuss the definitions of both these concepts and how they differ from one to another with the comparing between several popular frameworks and libraries.
First let's have a look at the definitions of each of these concepts.
Library
Basically Library is a collection of reusable code that is used to provide a solution for a specific problem. In here always code or the programmer calls the library.
React can be mention as a modern popular library for building reactive user interfaces.
Popular libraries in modern world
- jQuery
- React
- Tenserflow.js
1. jQuery
jQuery is a free and open-source JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and ajax.
2. React
Firstly, React is a library not a framework. React is a library which is created by Facebook for helping developers to build User Interfaces (UI) as a tree of small units which were called as components.
Since, React is only concerned with rendering the UIs and leaving many things up to each project to put together. Further the standard set of tools (stack) for building a React application was as follows:
- Application Code
- React
- Redux
- react-router
- Build Tools
- Webpack
- Uglify
- npm/yarn
- Babel
- babel-present-env
- Testing Tools
- ESLint
- Enzyme
- Mocha/Jest
Framework
Framework provides reusable code and furthermore it provides a well defined specific structure for building applications. Basically framework defines how the application structure should be defined, the way to interact with the components and standard way to build and deploy programs. In here framework calls the code.
Angular and Vue can be defined as modern popular frameworks used to build front-end applications.
Popular frameworks in modern world
- Angular
- Vue
- Spring/Spring Boot
- Bootstrap CSS framework
- .NET
- React Native
- Flutter
- Kotlin Native
- Laravel
- Ionic
- Selenium
- Next.js
- Ember.js
1. Angular
Angular is a platform and a framework for building single-page client applications using HTML and TypeScript. It implements core and optional functionality as set of TypeScript libraries that you import into your applications. The architecture of an Angular application may rely on certain fundamental conditions.
2. Vue
Vue is a progressive framework for building UIs. On the other hand, Vue is perfectly capable of powering sophisticated Single Page Applications with the combination of modern tooling and supporting libraries.
How a Library and a framework differ from?
The key difference between a library and a framework is "Inversion of Control" when you call a method from a library , you are the person in control which means you call the library. But when you work with a framework, the control is inverted which means that framework calls you. However, both of them provides a particular API for the programmers to deal with it.
Angular vs React
For an example let's take a comparison between Angular and React about their differences.
There are several similarities of Angular and React also. They are;
- Component-based Architecture
- Component's life cycle methods
- Third Party Libraries
- Large online communities
- Fast and effective performance (since both provides single page applications)
What is the Difference between a Specification and a Framework?
There is a confusion about the difference between a specification and a framework as well. So, let's have a quick look at what are the differences of both these concepts.
❄️Simply we could say that a specification is a set of rules which defines how to perform some use case and framework is the practical implementation of the specification with a specific structure.
Eg:- Spring is a huge framework to create web applications and Java EE (J2EE, Jakarta EE) is a Specification for Java enterprise applications which Spring framework is build to wrap those features.
Further more JSR-250 is a specification for Java annotations.
Further more JSR-250 is a specification for Java annotations.
Also JSF is the specification of a framework, of which there are several widely used implementations.
0Comments