One, Web server processing Web requests
(1) Web requests static content, the Web server looks for static content and sends it back to the browser
(2) Web requests dynamic content, the Web server finds the program to execute, executes the found program, then captures the output of the program as a Web response, and then sends it to the waiting browser. The process of producing dynamic content has been standardized, known as the Universal Gateway Interface (Common getway interface,cgi). Programs that meet this standard are often referred to as CGI scripts.
Second, MVC
(1) Good Web applications should follow the model-view-controller (Model-view-controller) pattern, which helps to divide the code of the Web application into manageable functional modules for easy expansion.
(2) Model: code that stores (and sometimes processes) Web application data; View: formatting and displaying code for the Web app user interface; controllers: Code that "glues" web apps together and provides business logic.
Head First Python learning Note (vii)