Skip to content
IT glossary
ProgrammingUpdated December 3, 2026

Framework

Фреймворк

A framework gives developers a ready-made foundation for building software. It handles recurring tasks and provides places to plug in code that the application needs.

What a framework gives you

A web API needs to match requests to handlers and turn their results into HTTP responses. Those jobs exist whether the API sells tickets or tracks deliveries. A framework supplies the machinery for the recurring work so your team can focus on rules specific to the product, such as when a booking can be canceled.

Who calls your code?

A framework defines extension points: places where your code fits into a process the framework manages. You might register a request handler, add middleware that runs before the handler, or provide a function to run during startup. Some frameworks use conventions instead of explicit registration. For example, Next.js can use a file's location to determine its URL route.

When the relevant event occurs, the framework calls the code you supplied. This is a form of inversion of control. Compare that with calling a date library: your code decides when to format a date and asks the library to do it. The distinction is about who coordinates the larger flow, not whether callbacks exist. Libraries can invoke callbacks, and applications built with frameworks still call library functions directly.

Example: a FastAPI route

from fastapi import FastAPI

app = FastAPI()

@app.get("/status")
def status():
    return {"status": "ok"}

The decorator registers status as the handler for GET /status. When a running application receives a matching request, FastAPI dispatches it to that function and turns the returned dictionary into a JSON response. You decide what data to return; the framework handles routing and response creation.

What a framework does and doesn't decide

Frameworks vary in scope. Django provides an ORM and an admin interface for database-backed applications. FastAPI focuses on building APIs and doesn't require a particular ORM. Angular provides a structure for browser applications. The label alone doesn't tell you how much the framework does for you or how strongly it shapes your project.

A common mistake is to put product rules directly in request handlers because that's where the framework first runs your code. If a rule like “a confirmed order can't be edited” lives in a plain function, you can test it without making an HTTP request and reuse it from a background job. The handler can focus on translating between HTTP and that function.

How it comes up in interviews

Expect to explain what happens between a request arriving and a response going out, and which steps the framework owns. If asked to choose a framework, tie your answer to the project: built-in admin tools might save weeks on an internal application, while a small API might benefit more from fewer built-in components and more freedom to choose its dependencies.