Home > other >  The fifth chapter web principle and application development
The fifth chapter web principle and application development

Time:10-11

World wide web consortium 5.1. HTTP protocol:
5.1.1 wwwWWW是World Wide Web (环球信息网)的缩写,也可以简称为Web,中文名字为"万维网", WWW(World Wide Web),是一张附着在Internet上的覆盖全球的信息"蜘蛛网",镶嵌着无数以超文本形式存在的信息,其中有璀璨的明珠,当然也有腐臭的垃圾,有人叫它全球网,有人叫它万维网,或者就简称为Web(全国科学技术名词审定委员会建议,WWW的中译名为"万维网"),WWW是当前Internet上最受欢迎,最为流行,最新的信息检索服务系统,它把Internet上现有资源统统连接起来,使用户能在Internet上已经建立了WWW服务器的所有站点提供超文本媒体资源文档,这是因为,WWW能把各种类型的信息(静止图像,文本声音和音像)无义无缝的集成起来,WWW不仅提供了图形界面的快速信息查找,还可以通过同样的图形界面(GUI)与Internet的其他服务器对接, 由于WWW为全世界的人们提供查找和共享信息的手段,所以也可以把它看作是世界上各种组织机构,科研机关,大学,公司厂商热衷于研究开发的信息集合,它基于Internet的查询,信息分布和管理系统,是人们进行交互的多媒体通信动态格式,它的正式提法是:"一种广域超媒体信息检索原始规约,目的是访问巨量的文档",WWW已经实现的部分是,给计算机网络上的用户提供一种兼容的手段,以简单的方式去访问各种媒体,它是第一个真正的全球性超媒体网络,改变了人们观察和创建信息的方法,因而,整个世界迅速掀起了研究开发使用WWW的巨大热潮, WWW诞生于Internet之中,后来成为Internet的一部分,而今天,WWW几乎成了Internet的代名词,通过它,加入其中的每个人能够在瞬间抵达世界的各个角落,只要将一根电话线插入你的PC(它可能是你随身携带的笔记本电脑加上一部移动电话),此时全球的信息就在你的指尖! WWW doesn't actually exist which parts of the world, in fact, the WWW users every day, give it new meaning, Internet social citizens (including organizations and individuals), to all kinds of information they need to be made public in the form of a home page (Homepage) embedded in the WWW, the home page in addition to the text includes graphics, voice and other forms of media; While content from all kinds of ads to electronic bible, can say everything, and home page is published on the Web is the main form of some HTML Text (HTML is the Hyper Text Markup Language, hypertext mark-up,

5.1.2 TCP/IP
TCP/IP transport protocol, that is, transmission control/network protocol, also called a network communication protocol, it is the most basic in the use of the network communication protocol, TCP/IP transport protocol for each part of the Internet to communicate the standards and methods of regulation, and TCP/IP transport protocol is to ensure network data information in a timely manner, a complete transfer of two important protocol, TCP/IP transport protocol is strictly speaking is a system of four layers of structure, the application layer, transport layer, network layer and data link layer contain among them,
TCP/IP protocol is the basic of the Internet, one of the major application layer protocol Telnet, FTP, SMTP, etc., are used to receive data from the transport layer, or according to different application requirements and methods of data transmission to the transport layer; The major transport layer protocol is a UDP, TCP, is consumer USES computer information network platform and internal data channels, can realize the data transmission and data sharing; The major network layer protocol have ICMP, IP, IGMP, mainly responsible for the transfer of data packets over the Internet, etc.; The network access layer, also called the network interface layer and data link layer, the main agreement are ARP, RARP, main function is to provide the link management error detection, for different communication media information about the details for effective treatment, etc.,
5.1.3 the HTTP protocol principle

The WWW is based on the Internet as an application system of transmission medium, the WWW Web is the most basic transmission unit of a Web page, the WWW work based on client/server computing model, by the Web browser (the client) and the Web server (server), between the hypertext transfer protocol (HTTP) to communicate, the HTTP protocol is a protocol based on TCP/IP protocol, is an application layer protocol between Web browsers and Web servers, is universal, stateless, object-oriented protocol,

The role of the HTTP protocol principle includes four steps:
(1) : a Web browser and the Web server connection, open a called socket (socket) virtual file, the file marks the establishment of the connection is established successfully,

(2) request: a Web browser to the Web server through socket submit a request, the HTTP request is typically GET or POST command (POST for the FORM parameter transfer), the GET command format is: HTTP/1.0 GET path/filename file name is pointed out that the file access, HTTP/1.0 points out that the Web browser using HTTP version,

(3) response: a Web browser to submit request, through the HTTP protocol to the Web server, Web server, after receiving the transaction processing, processing results and returned via HTTP to the Web browser, which shows that the requested page on the Web browser,

Example: suppose the client and www.mycompany.com:8080/mydir/index.html connection is established, it will send a GET command: GET/mydir/index. The HTTP/1.0 HTML, the host called www.mycompany.com Web server from the document space search mydir suozi catalog file index. The HTML, if found the file, the Web server to transfer the file content to the appropriate Web browser, in order to transmit content type told a Web browser, Web server some HTTP headers sent first, and then transmit specific content (i.e., the HTTP body information), HTTP headers and separated by a blank line between the HTTP body information,

Common HTTP headers are:
(1) the HTTP 1.0 200 OK this is the first line of the Web server response, list the HTTP server is running the version number and reply code, the code "200 OK" said request is completed,
(2) MIME_Version: version 1.0 it indicates the MIME type,
(3) content_type: type the header information is very important, it indicates the HTTP body the MIME type of information, such as: content_type: text/HTML indicates the data transmission is an HTML document,
(4) content_length: length value indicating the HTTP body length (bytes) of information,
(4) close the connection: when the response is complete, a Web browser and the Web server must be broken, in place to ensure that other Web browsers to establish the connection with the Web server,


The HTTP protocol analysis
A, the HTTP protocol description
HTTP is a client-side and server-side standard request and response (TCP), the client is the end user, the server is a Web site, through the use of a Web browser, Web crawler or other tools, launched a client to the specified port on the server (the default port is 80) of the HTTP request, (we call this client) user agent (user agent), reply with (some) stored on the server resources, such as HTML files and images, (call) the response for the source server (origin server), between the user agents and the source server there may be multiple layer, such as agent, gateway, or tunnel (tunnels), although the TCP/IP protocol is the most popular Internet application, the HTTP protocol and must use it and no regulations (based on) it support layer, in fact, can on any other Internet protocols HTTP, or on other network implementation, HTTP only assume its lower level protocols provide reliable transmission, any be able to provide this guarantee agreement can be used by its,
5.2.4 XML
XML language is a kind of similar to the HTML markup language, is mainly used for structured document information,
The session server
Cookie client
Session tracking technology is divided into: the session cookies, hidden form fields, url rewriting,
The servlet: is the basis of javaEE development, is the small program running on the server,
5.7.1 SSH
SSH is not a framework, rather than the integration of multiple framework, from the responsibility system of integrated SSH framework is divided into four layers: the presentation layer, business logic layer and data persistence layer and domain module layer.
  • Related