First, Web applications
A Web application is an application that can be accessed through the web;
The biggest benefit of the program is that the user has easy access to the application, and the user needs only a browser and no additional software to install.
There are two modes of application: C/S,/b.
1, c/S is a client/server-side program, which means that such programs generally run independently.
2, b/S is browser-side/server-side applications, such applications generally with the help of Google, Firefox and other browsers to run.
Web applications are generally b/s mode. Web applications are first "applications", and programs written in standard programming languages, such as Java,python, are not inherently different. in the sense of network programming, the browser is a socket client, and the server is a socket service side.
#-*-Coding:utf-8-*-__author__ = ' Qiushi Huang ' Import socketsock = Socket.socket () sock.bind (("127.0.0.1", 8800) # Server Ground Address and Port Sock.listen (5) while True:print ("Server Waiting ...") # Conn: Client socket object, ADDR:CONN,ADDR = Sock.accept () # etc User connection data = CONN.RECV print ("Data", data) # reads HTML file with open ("Index.html", "R") as F:data = f . read () # response First line (http/1.1 OK), Response body # conn.send (b "http/1.1 Ok\r\n\r\n
Web applications and HTTP protocols