What is the difference between a library and a framework?

2.41K views

What is the difference between a library and a framework?

In: Technology

4 Answers

Anonymous 0 Comments

A framework is a basic working model of a solution to some problem. For example, when you go out to eat, the basic framework for a meal is: drinks, appetizers, main course, and dessert. Now, you can modify this all you want. Maybe you want dessert wines at the end, or maybe you want to throw in a salad course. The point being is that a framework gives you a starting point from where you can jump from.

A library is a working set of tools to solve a specific problem. To keep the restaurant analogy going, when you go to a restaurant, it is likely that they do not physically make their own silverware, instead they go to the store and buy it as a restaurant’s job is to focus on the food, not the utensils. In this case, the library would be utensils as the specific problem they solve is aiding in eating food. At the end of the day, libraries aren’t needed (e.g the restaurant can make their own utensils if they really wanted), but they greatly help increase efficiency.

Generally, you use frameworks and libraries together. Say you were to open a restaurant, the basic meal framework would be as outlined above and you would use “libraries” of furniture, silverware, etc to aid in the operations of the restaurant. You could even consider the chef to be a library as he/she solves the problem of making the food if the owner themself isn’t cooking.

You are viewing 1 out of 4 answers, click here to view all answers.