




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、基于web的應(yīng)用系統(tǒng)開發(fā)4. web browsers, servers and httphttp:/ paradigm lweb browserslweb serverslurl lmimelhttp 3the client server paradigmla widely used form of communicationlserver application waits passively for contact from clientsla server provides a specific servicelclient application actively initiates
2、 contact with the serverlinformation can flow in both directionsltypical situation is many clients interacting with each server4web browserslbrowsers are clients always initiate, servers react lallow user to browse resources available on server either existing or dynamically built documentsl mosaic
3、- 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 1993lcurrent common browsers internet explorer, netscape, opera, mozilla firefox, safari, google chrome (as of 9/3/08)5web servers
4、lprovide responses to browser requestslall 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 when they appearlcommon servers apache, int
5、ernet information server (is)6uniform resource locators (urls)lstandard way of specifying entities on networkslfirst part - protocol terminated by colon ( : ) common protocols are http, ftp, mailto, telnet, i.e.: http: ftp: mailto: telnet:lsecond part - varies according to protocol mailto - e-mail a
6、ddress e.g.: mailto: 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-name/path-to-documentloptional third parts query st
7、ring (preceded by ?) fragment identifier (preceded by #)7example urlslmailto:lhttp:/ :80/lhttp:/:8799/lhttp:/uname: server characteristicslweb servers have two main directories: 1. server root (server system software) 2. document root (servable documents) this will map to the url of the full domain
8、name, e.g.:http:/ 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.:http:/ server characteristicsldocument root is accessed indirectly by clients its actual location is set by the server
9、configuration file requests are mapped to the actual location e.g. doc root is topdocs and stored in /admin/web site is http:/ when there is a request for http:/ server searches for file with address /admin/web/topdocs/bulbs/tulips.html 10additional server features lvirtual document trees part of se
10、rvable document collection stored outside the document root lvirtual hosting support for more than one site on a computerlproxy servers serve documents that are in the document root of other machines11multipurpose internet mail extensions (mime)loriginally developed for emaillused to specify documen
11、t types transmitted over the web mime type attached by the server to the beginning of the documentl type specifications form: type/subtype examples: text/plain, text/html, image/gif, image/jpeg12mime lserver gets type from the requested file names suffix (.html implies text/html)lbrowser gets the ty
12、pe explicitly from the serverlexperimental 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 with the file13world wide web overview http server apache ms iisclientnetscape navigator ms internet expl
13、orerhttp request (url)http response (html data)14design paradigm of the wwwlwww is a global hypertext systemlthe page is the basic unit of the wwwleach page has a unique identifier the urllpages may contain links to data of any typelsome data (e.g. images) may be interpreted by the browser and displ
14、ayed “inline”lpages may contain links to other urls15the http protocol linvented by tim berners-lee in 1990lrfc 1945 (1996) - http/1.0lrfc 2068 (1997) - http/1.1lrfc 2616 (1999) - http/1.1 (update to 2068)16features of httplapplication level, client-server protocol primarily for distributed hypermed
15、ia systems flexible - thus has many other uses - e.g.: nameservers distributed & collaborative document management systemslhttp is small and fast minimal performance overhead easy to implementlhttp is a stateless protocol each request is an independent transaction - unrelated to any previous request
16、s (unlike session-based protocols, e.g. ftp) advantage simplifies server design - information about previous transactions does not need to be stored disadvantage more information must be included in each request17http operationlon the internet http usually uses tcp/ip connectionsltcp port 80 is the
17、default (though others can be specified)lhttp uses a request/response paradigm client establishes a connection to the server, and sends it a request server responds to the request by generating a response (which may or may not contain content)18http requestldelivered from a client to a server contai
18、ning instructions for the serverlcontains the method to be applied to the data resource the identifier of the resource the protocol version in uselmost commonly used methods: get - fetch a document head - fetch just the header of the document post - execute the document, using the data in body put -
19、 store a new document on the server delete - remove a document from the server19request messagemethod /path-to-resource http/version-numberheader-name-1: valueheader-name-2: valueoptional request body general request message structure get /index.html http/1.1 host: accept: text/*user-agent: mozilla/
20、2.02gold (winnt; i)example 20telnet http requestla browsers is not necessary to communicate with a web server telnet http get /respond.html http/1.1 host: 21http response lmessage generated by a server after receiving and interpreting a requestlresponses 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)22response messagehttp
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 愛心德課件教案
- 四升五年級暑假數(shù)學(xué)天天練
- 大口徑頂管施工技術(shù)難點與解決方案研究
- 愛人民班會課件
- 綠色金融創(chuàng)新:金融機構(gòu)碳市場參與機制研究
- 經(jīng)濟發(fā)展與環(huán)境保護:流域經(jīng)濟社會與生態(tài)用水壓力的空間演變
- 在線考試系統(tǒng):Java在線考試系統(tǒng)的研發(fā)設(shè)計
- 爆破作業(yè)技能與安全課件
- 生態(tài)環(huán)境導(dǎo)向開發(fā)模式下的田園綜合體土壤有機碳分布特征研究
- 室內(nèi)設(shè)計師崗位面試問題及答案
- 教師的職業(yè)生涯規(guī)劃與專業(yè)發(fā)展課件
- (完整版)標書密封條格式word
- 《關(guān)于漢語規(guī)范化的意義探析》
- 公司一年完稅證明模板
- [湖南]5萬噸凈水廠給排水工藝全套圖紙(附170頁計算說明)
- DB33T 1203-2020 建設(shè)工程施工揚塵控制技術(shù)標準
- 外國文學(xué)名著導(dǎo)讀
- 腦卒中患者血壓管理
- 如何制作OruxMaps離線地圖
- 校企汽修專業(yè)戰(zhàn)略合作協(xié)議書
- 《紅樓夢》四大家族主要人物關(guān)系圖
評論
0/150
提交評論