Skip to content
BENIBIX Learn

Library vs Framework

Your code calls a library when it wants help. A framework is the other way round: it runs the show and calls your code.

Development🛠️ Editors & Tools

Software Library

Ready-made code for one kind of job. You load it and call it from your code.

A software library is a set of code that someone else wrote for you to reuse. It does one kind of job, like reading dates, drawing charts or talking to a website. You load it into your program and call its functions. Your code stays in charge and decides when to use it. Most programs lean on many libraries.

Example
Emma needs to read a spreadsheet in Python. Instead of writing 500 lines, she loads a library and calls one function.
Why it matters
Libraries save months of work. They are also tested by thousands of other users.
Full entry
Development🛠️ Editors & Tools

Software Framework

A ready-made base for an app. You fill in the parts, and it calls your code.

A software framework is a ready-made base that gives your app its shape. It sets out where each kind of code goes and how the parts talk. You fill in the gaps, and the framework calls your code when it is needed. That is the main difference from a library, which waits for you to call it. React, Django and Rails are well-known frameworks.

Example
Jack builds a shop site with Django. It already handles logins and pages; he only writes the parts that are about his shop.
Why it matters
A framework makes the big choices for you, so a team can start building on day one.
Full entry

In one line

Software Library
Ready-made code for one kind of job. You load it and call it from your code.
Software Framework
A ready-made base for an app. You fill in the parts, and it calls your code.