Professional Documents
Culture Documents
Flask 入门: - Python网站开发框架
Flask 入门: - Python网站开发框架
• Python网站开发框架
大纲
• 什么是⽹站开发框架
• MVC开发模式
• Flask入门
Python Ecosystem
• MVC开发模式
• Flask基础介绍
Flask 后端开发
为什么需要范式 WHY MVC ?
”Functionality may be
achieved through the use of
any of a number of possible
structures. In fact, if
functionality were the only
requirement, the system
could exist as a single
monolithic module with no
internal structure at all.”
--
Software Architecture in
Practice
Chapter 4
MVC 范式
Flask 基本法则
• URL参数
• HTTP POST Body
• Form
无处不在的二维码QR
• Quick Response
图片来自: https://zh.wikipedia.org/wiki/QR%E7%A2%BC
静态文件管理, Path vs URL/URI
懒人的福音,Template
• Cookie Based
• Token Based
网站日志 logging
• Python Logging
MVC
ROUTES VIEW
CONTROLLER
MODEL
如何链接数据库
• 数据库驱动直接连接
• ORM
Better Framework
• aiohttp
• django
谢谢
beijing@dataapplab.com