基于Web科学应用系统开发

上传人:san****glu 文档编号:115087964 上传时间:2019-11-12 格式:PPT 页数:23 大小:515.50KB
返回 下载 相关 举报
基于Web科学应用系统开发_第1页
第1页 / 共23页
基于Web科学应用系统开发_第2页
第2页 / 共23页
基于Web科学应用系统开发_第3页
第3页 / 共23页
基于Web科学应用系统开发_第4页
第4页 / 共23页
基于Web科学应用系统开发_第5页
第5页 / 共23页
点击查看更多>>
资源描述

《基于Web科学应用系统开发》由会员分享,可在线阅读,更多相关《基于Web科学应用系统开发(23页珍藏版)》请在金锄头文库上搜索。

1、基于Web的应用系统开发 4. Web browsers, servers and HTTP 2 Overview lClient-server paradigm lWeb browsers lWeb servers lURL lMIME lHTTP 3 The client server paradigm lA widely used form of communication lServer application waits passively for contact from clients lA server provides a specific service lClient a

2、pplication actively initiates contact with the server lInformation can flow in both directions lTypical situation is many clients interacting with each server 4 Web Browsers lBrowsers are clients always initiate, servers react lAllow user to browse resources available on server either existing or dy

3、namically built documents l Mosaic - NCSA (Univ. of Illinois), in early 1993 First to use a GUI, led to explosion of Web use Initially for X-Windows, under UNIX, but was ported to other platforms by late 1993 lCurrent common browsers Internet Explorer, Netscape, Opera, Mozilla Firefox, Safari, Googl

4、e Chrome (as of 9/3/08) 5 Web Servers lProvide responses to browser requests lAll communications between browsers and servers use Hypertext Transfer Protocol (HTTP) lWeb servers run as background processes in the operating system Monitor a communications port on the host, accepting HTTP messages whe

5、n they appear lCommon servers Apache, Internet Information Server (IS) 6 Uniform Resource Locators (URLs) lStandard way of specifying entities on networks lFirst part - protocol terminated by colon ( : ) common protocols are http, ftp, mailto, telnet, i.e.: http: ftp: mailto: telnet: lSecond part -

6、varies according to protocol mailto - e-mail address e.g.: mailto: wjsun resource-oriented protocols (http, ftp etc) Host name + domain names (preceded by /) may optionally include username, password and port Pathname (usually related to the path of a file on the server) i.e. /fully-qualified-domain

7、-name/path-to-document lOptional third parts Query string (preceded by ?) Fragment identifier (preceded by #) 7 Example URLs lmailto:wjsun l lhttp:/ :80/ l :8799/ lhttp:/uname:pword l l lftp:/uname:pword lftp:/ 8 General Server Characteristics lWeb servers have two main directories: 1. Server root (

8、server system software) 2. Document root (servable documents) This will map to the URL of the full domain name, e.g.: User document root directory Directories of a standard name in the users home directory Usually this is called public_html The URL is then mapped as username e.g.: 9 General Server C

9、haracteristics lDocument root is accessed indirectly by clients Its actual location is set by the server configuration file Requests are mapped to the actual location E.g. doc root is topdocs and stored in /admin/web Site is When there is a request for Server searches for file with address /admin/we

10、b/topdocs/bulbs/tulips.html 10 Additional Server Features lVirtual document trees Part of servable document collection stored outside the document root lVirtual hosting Support for more than one site on a computer lProxy servers Serve documents that are in the document root of other machines 11 Mult

11、ipurpose Internet Mail Extensions (MIME) lOriginally developed for email lUsed to specify document types transmitted over the Web MIME type attached by the server to the beginning of the document l Type specifications Form: type/subtype Examples: text/plain, text/html, image/gif, image/jpeg 12 MIME

12、lServer gets type from the requested file names suffix (.html implies text/html) lBrowser gets the type explicitly from the server lExperimental types Subtype begins with x- e.g. video/x-msvideo Experimental types require the server to send a helper application or plug-in so the browser can deal wit

13、h the file 13 World Wide Web Overview HTTP Server Apache MS IIS Client Netscape Navigator MS Internet Explorer HTTP request (URL) HTTP response (HTML data) 14 Design Paradigm of the WWW lWWW is a global hypertext system lThe page is the basic unit of the WWW lEach page has a unique identifier the UR

14、L lPages may contain links to data of any type lSome data (e.g. images) may be interpreted by the browser and displayed “inline” lPages may contain links to other URLs 15 The HTTP Protocol lInvented by Tim Berners-Lee in 1990 lRFC 1945 (1996) - HTTP/1.0 lRFC 2068 (1997) - HTTP/1.1 lRFC 2616 (1999) -

15、 HTTP/1.1 (update to 2068) 16 Features of HTTP lApplication level, client-server protocol Primarily for distributed hypermedia systems Flexible - thus has many other uses - e.g.: Nameservers Distributed I) Example 20 telnet HTTP request lA browsers is not necessary to communicate with a web server t

16、elnet http GET /respond.html HTTP/1.1 Host: 21 HTTP Response lMessage generated by a server after receiving and interpreting a request lResponses contain: Status line with the protocol version, a status code, and a “reason phrase” Response-Header (containing information about the server) Entity Header (meta-information) Entity Body (data) 22 Response messag

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号