An Introduction to Frameworks and Libraries

Fortress Enebe
3 min readFeb 14, 2021
Source: ICODEMAG

Today I’ll be taking you on a short journey to understanding what Frameworks and Libraries are, and the differences that exist between them.

That said, let’s hit the road.

One thing that you should get clearly before we proceed is the fact that Libraries and Frameworks are very different terms that shouldn’t be used interchangeably as they both operate with different concepts.

A number of Frameworks and Libraries exist for various core programming languages. They are developed by certain individuals or groups to make problem-solving in these core languages easier and faster. A list of popular programming languages and an example of their Libraries and Frameworks are shown below:

Difference Table

LIBRARIES

Libraries are reusable functions created to solve specific problems. These functions are condensed lines of codes called by the developer only when he needs to solve a particular problem or perform a specific task.

A quick example to drive this home is the process of making rice. In the part of the world where I come from, people make rice with various ingredients (some of which are dispensable), some of which are added at various intervals based on the needs and choice of the cook. The same process of adding ingredients at different intervals applies to libraries as they are only used when appropriate, leaving the developer in charge of when and where they should be called and used.

Libraries help you perform tasks without changing anything at the structural and architectural level of the codes and this makes it possible and easy for it to be added seamlessly into existing projects.

FRAMEWORKS

IN COMPUTER PROGRAMMING, A SOFTWARE FRAMEWORK IS AN ABSTRACTION IN WHICH SOFTWARE PROVIDING GENERIC FUNCTIONALITY CAN BE SELECTIVELY CHANGED BY ADDITIONAL USER-WRITTEN CODE, THUS PROVIDING APPLICATION-SPECIFIC SOFTWARE.– WIKIPEDIA, MAY 15TH, 2020

In a simpler term: Frameworks provide a skeletal system for your projects and then allow you to add flesh to it.

Since it can’t be integrated into existing projects seamlessly, Frameworks form the base of a project. That is, if you must use a Framework, you must start the project with it. Once the project is started, the Framework which is highly opinionated determines the flow. Like where and where exactly a developer should add different parts of his codes or files. Frameworks leave the developer with no control (Inversion Control) as the developer is fully immersed in the workflow of the Framework and not his.

Here’s a quick illustration to drive my point: There are different recipe books describing the procedures involved in making zucchini bread. Any recipe book you decide to use has a Framework you need to follow to arrive at the desired taste, which might be different from what other recipe books may provide. Each step you need to execute is well defined in the recipe book and must be followed from the beginning to the end in the defined order if you must arrive at your result. The recipe book allows you to carry out certain steps while withholding the privilege to edit the steps it provides. The above, explains the way Frameworks work.

CONCLUSION

In conclusion, you should remember that any function belonging to a Framework can only be called within that Framework, while a Library can be called at any point out of context.

With these said, where do you think ReactJS fits in?

Originally published on ICODEMAG

--

--