December, 2021
By Irine Gamkrelidze

What is framework or library, and how do they compare?

What is framework or library, and how do they compare?

We live in a world of frameworks and libraries; you cannot browse any development or programming forum without coming across these two. Framework and libraries are a set of classes, modules and/or code that can be used in your app development process, it helps you to solve a specific “Problem area’. So let’s go back to the basics and start with definitions, what is a library and what’s a framework? Then we can discuss the differences!


Framework - the best way to describe it would be to refer to it as a skeleton with specific openings you’re supposed to fill in with a code. A framework is more like a blueprint for a home, you cannot change it, but you can decorate, with limited control

Library - is defined as a set of functions organized inside classes. You call on these set of functions, and the library does some sort of work. To continue with the example, if the framework is a blueprint, then the library is like Target; you can shop for stuff you like, pick and choose precisely what you’d like to see in your code. 


  1. While we are on the subject of control, we should mention that the most fundamental difference between a framework and a library is precisely that - control. You call on the library, but the framework calls you. This difference may be the biggest of them all, because of the inversion of control. Some even call it the Hollywood principle, and Frameworks are like agents; they always say: Don’t call us, we’ll call you. On a more serious note, a framework takes control away from the developer. They are more “opinionated” compared to libraries. It tells you what needs to be done, and you do it. 
  2. Another big difference is described by developers perfectly, they said: with a library, you can choose whatever little part you like, while with a framework, you have to commit your entire project to it. No negotiation. 
  3. While working on an outsourced web development project, you may decide to replace one library with another, but that’s not how frameworks function. If you don’t like a specific part of the library, you can swap it quickly, but in case you’d like to change your framework, you most likely will have to rewrite your entire code base. Ouch. 

Whatever you’re working on, whether it’s a personal project or an outsourcing job in the IT field, you have to keep in mind that frameworks are much stricter and have more control over you. At the same time, libraries are contained and can be re-used on other projects. This article may make frameworks sound bad, and libraries look cool, but the main conclusion is that both of these items are very useful tools if they’re applied correctly. 


Related blog posts

February, 2021

Custom CMS VS Wordpress

An age-old question in development: Do we walk the roads less traveled or do we just go with WordPress CMS? CMS is an acronym for a Content Management System. One might ask, why...

March, 2021

Secret Weapon of Popular Apps - Clojur...

Have you ever used a program that you liked and wondered, how it works? Since we deal with clients from all over the world on outsourced development projects, we use Grammarly quite often. During our weekly emailing...