How Library differs from Framework - Veltris

How Library differs from Framework

September 12, 2020 | Tushar Jain

    In this article, we will discuss about the difference between libraries and frameworks. When I started learning about REACT(Read more about React), I came to know that, it is a library, whereas there is also something termed as Angular, which is a Framework. I was so confused, as both are based on JavaScript and I had no idea about what difference does it make calling something framework or library. So, I thought why not explore these two?
    And from there my Journey began ……

    Introduction
    Let’s try to understand these two friends, library and framework by taking a real-world example, The Library is like your room where you can throw your t-shirt anywhere, change the design of your room according to you, you can keep anything anywhere no permission is required others people. you can build your own rules, but the framework is different for the library.

    The Framework is like you can go to the class where the architecture of rules is defined you follow the rules and principles you don’t have to make your own rules in the framework. In the framework, it is the set of rules you are bound to follow these rules.

    We understand in simple ways, In the framework is usually a collection of libraries that work together to serve a greater purpose. It is like a structure you plug your code into. In the library is a collection of reusable functions that can be used in our code when we need it. when we defined a function and we don’t have to write a function again and again so we call a function or method again or multiple times.

    What is the Library?

    1. The library is a collection of reusable functions used by computer programs meaning the resources which you can reuse which may include classes, subroutines, pre-compiled code, message templates, etc.
    2. Mostly in Programming languages have their own standard libraries but programmers can also create their own custom libraries
    3. It simply is a piece of code written by other developers that can be reused anywhere.
    4. Libraries can be seamlessly incorporated into existing projects to add functionality which you can further access using an API.

    What is the Framework?

    1. The framework is a piece of code that dictates how the project should be structured and run.
    2. It simply mandates the architecture of your project like defining the design parameters of an application so that you can focus on the specifics of the project, thereby emphasizing on reusability of design rather than reusability of code
    3. Unlike libraries, the control is inverted in case of frameworks and the code never calls into a framework, instead, the framework calls you.
    4. Unlike libraries, frameworks emphasize structure and standards.
    the workflow of library and framework

    Basis of differentiation Library and Framework

    If you like my blog please clap🧤 and pls give me a review you like or not in a comment section. Motivates me writing my next blog.

    Related Articles