Intensive lecture on Flask framework technology

Author: Zen and the Art of Computer Programming

1 Introduction

Flask is a micro-web application framework based on Python. It can quickly and easily develop scalable web applications, and it is very easy to learn and use. This article will introduce the basic knowledge and common functional modules of the Flask framework in a simple way, and demonstrate its powerful features through multiple examples. The article is mainly suitable for junior developers who have a certain understanding of the Python language and related technologies but do not understand Flask.

2. Basic concepts

web development

In the world of the Internet, a website (web site) refers to an information service platform accessed through the network. The content of the website generally includes static pages and dynamically generated content, and communicates through the HTTP protocol. Static pages are HTML files, which are generated by the server and sent to the user's browser. The content is rendered by the browser into an interactive page and displayed on the screen; dynamically generated content refers to the data generated by the server according to user requests or other conditions, such as Database query results, user input values, etc., are then converted by the server into corresponding output formats (such as JSON, XML, HTML, etc.).

template engine

A template engine is a tool used to generate dynamic web pages. Traditional static web pages can only contain a small number of tags and text, and the same code needs to be written repeatedly in each page, resulting in a lot of redundancy. The template engine solves this problem through precompilation, abstracts some elements in the static webpage into templates, and then generates different dynamic webpages according to the parameters. The role of the template engine is to fill the data into the template file through the template to generate the final visual web page. Common template engines include Jinja2, Django Template, etc.

Web framework

Web framework (Web framework) is a software design pattern that decomposes complex network applications into various subsystems, thereby simplifying the difficulty of application development.

Guess you like

Origin blog.csdn.net/universsky2015/article/details/132706223