Software Development

What is Framework?

Quick answer

A reusable foundation of code, tools, and conventions that developers build applications on top of.

Framework, explained

A framework provides structure so developers do not have to solve common problems from scratch. It typically handles things like routing web requests, rendering pages, connecting to databases, or managing state, while the developer fills in the application-specific logic.

A useful distinction is that you call a library when you need it, but a framework calls your code at the right time, a principle known as inversion of control. Popular examples include Django and Flask for Python, Spring for Java, Ruby on Rails, Angular and Next.js for JavaScript, and Laravel for PHP. Frameworks speed up development and encourage consistency, but they also impose opinions and can be hard to move away from later.

Related terms

Guides that mention Framework