Routing
Connect incoming requests to application logic.
A structured set of tools and conventions used to build software applications.
A framework provides a reusable structure for building applications.
Instead of creating every technical piece from scratch, developers follow the framework's patterns and use its built-in capabilities.
Simple Definition:
A framework gives developers a ready-made structure for building software.
Think of building a house.
A programming language gives you the raw materials.
A framework gives you a building structure and common construction rules.
Backend frameworks can provide:
Connect incoming requests to application logic.
Receive and process requests consistently.
Check whether input follows required rules.
Respond safely when something goes wrong.
Organize software components the application needs.
Keep code organized in a repeatable way.
Frameworks are used in:
Text:
Python provides the language.
FastAPI provides the structure for defining API routes and handling requests.
Flow:
Provides the overall structure and calls application code.
Provides reusable functionality that application code calls.
Framework = Application Structure
Library = Reusable Capability
| ENGLISH TERM | 中文 | SIMPLE ENGLISH | 中文小白理解 |
|---|---|---|---|
| Framework | 框架 | A structured set of tools used to build applications. | 提供应用结构和常用能力的一套开发框架。 |
| Library | 库 | Reusable code used by an application. | 提供某类功能、可以被程序直接调用的代码集合。 |
| Convention | 约定 | A standard way a framework expects code to be organized. | 框架建议开发人员按照统一方式组织代码的规则。 |
| Routing | 路由 | Connecting incoming requests to application logic. | 把某个 URL 请求连接到对应处理代码的机制。 |
| Application Structure | 应用结构 | The organization of code inside an application. | 一个软件项目内部代码和模块的组织方式。 |
| FastAPI | FastAPI | A Python framework used to build APIs. | 用 Python 开发 API 的后端框架。 |
Frameworks provide structure.
They reduce repeated technical setup.
A framework is not the same as the programming language.