【大學(xué)】基于Web的應(yīng)用系統(tǒng)開發(fā)ppt課件_第1頁
【大學(xué)】基于Web的應(yīng)用系統(tǒng)開發(fā)ppt課件_第2頁
【大學(xué)】基于Web的應(yīng)用系統(tǒng)開發(fā)ppt課件_第3頁
【大學(xué)】基于Web的應(yīng)用系統(tǒng)開發(fā)ppt課件_第4頁
【大學(xué)】基于Web的應(yīng)用系統(tǒng)開發(fā)ppt課件_第5頁
已閱讀5頁,還剩19頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、基于Web的運(yùn)用系統(tǒng)開發(fā)4. Web browsers, servers and OverviewlClient-server paradigm lWeb browserslWeb serverslURL lMIMEl The client server paradigmlA widely used form of communicationlServer application waits passively for contact from clientslA server provides a specific servicelClient application actively in

2、itiates contact with the serverlInformation can flow in both directionslTypical situation is many clients interacting with each serverWeb BrowserslBrowsers are clients lalways initiate, servers react lAllow user to browse resources available on server leither existing or dynamically built documentsl

3、 Mosaic - NCSA (Univ. of Illinois), in early 1993lFirst to use a GUI, led to explosion of Web uselInitially for X-Windows, under UNIX, but was ported to other platforms by late 1993lCurrent common browserslInternet Explorer, Netscape, Opera, Mozilla Firefox, Safari, Google Chrome (as of 9/3/08)Web S

4、ervers lProvide responses to browser requestslAll communications between browsers and servers use Hypertext Transfer Protocol ()lWeb servers run as background processes in the operating systemlMonitor a communications port on the host, accepting messages when they appearlCommon serverslApache, Inter

5、net Information Server (IS)Uniform Resource Locators (URLs)lStandard way of specifying entities on networkslFirst part - protocollterminated by colon ( : )lcommon protocols are , ftp, mailto, telnet, li.e.: : ftp: mailto: telnet:lSecond part - varies according to protocollmailto - address e.g.:lmail

6、to: lresource-oriented protocols (, ftp etc)lHost name + domain names (preceded by /)lmay optionally include username, password and portlPathname (usually related to the path of a file on the server)li.e. /fully-qualified-domain-name/path-to-documentlOptional third partslQuery string (pr

7、eceded by ?)lFragment identifier (preceded by #)Example URLslmailto:/l :80/:8799/luname:/private//dbase?/myfile.html#thirdlftpuname://General Server CharacteristicslWeb serv

8、ers have two main directories:l1. Server root (server system software)l2. Document root (servable documents)lThis will map to the URL of the full domain name, e.g.:/lUser document root directorylDirectories of a standard name in the users home directorylUsually this is called public_htmllThe

9、 URL is then mapped as username e.g.:/wjsun/General Server CharacteristicslDocument root is accessed indirectly by clientslIts actual location is set by the server configuration filelRequests are mapped to the actual locationlE.g. doc root is topdocs and stored in /admin/weblSite is flow

10、erslWhen there is a request for flowers/bulbs/tulips.htmllServer searches for file with address l/admin/web/topdocs/bulbs/tulips.html Additional Server Features lVirtual document treeslPart of servable document collection stored outside the document root lVirtual hosting lSupport for more than one s

11、ite on a computerlProxy serverslServe documents that are in the document root of other machinesMultipurpose Internet Mail Extensions (MIME)lOriginally developed for lUsed to specify document types transmitted over the WeblMIME type attached by the server to the beginning of the documentl Type specif

12、icationslForm: type/subtypelExamples: text/plain, text/html, image/gif, image/jpegMIME lServer gets type from the requested file names suffix (.html implies text/html)lBrowser gets the type explicitly from the serverlExperimental typeslSubtype begins with x- le.g. video/x-msvideolExperimental types

13、require the server to send a helper application or plug-in so the browser can deal with the fileWorld Wide Web Overview Server Apache MS IISClientNetscape Navigator MS Internet Explorer request (URL) response (HTML data)Design Paradigm of the WWWlWWW is a global hypertext systemlThe page is the basi

14、c 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 displayed “inlinelPages may contain links to other URLsThe Protocol lInvented by Tim Berners-Lee in 1990lRFC 1945 (1996) - /1.0lRFC 20

15、68 (1997) - /1.1lRFC 2616 (1999) - /1.1 l(update to 2068)Features of lApplication level, client-server protocollPrimarily for distributed hypermedia systemslFlexible - thus has many other uses - e.g.:lNameserverslDistributed & collaborative document management systemsl is small and fastlMinimal perf

16、ormance overheadlEasy to implementl is a stateless protocollEach request is an independent transaction - unrelated to any previous requests (unlike session-based protocols, e.g. FTP)lAdvantagelSimplifies server design - information about previous transactions does not need to be storedlDisadvantagel

17、More information must be included in each request OperationlOn the Internet usually uses TCP/IP connectionslTCP Port 80 is the default (though others can be specified)l uses a Request/Response paradigmlClient establishes a connection to the server, and sends it a requestlServer responds to the reque

18、st by generating a response (which may or may not contain content) RequestlDelivered from a client to a server containing instructions for the serverlContainslthe method to be applied to the data resourcelthe identifier of the resourcelthe protocol version in uselMost commonly used methods:lGET - Fe

19、tch a document lHEAD - Fetch just the header of the documentlPOST - Execute the document, using the data in bodylPUT - Store a new document on the serverlDELETE - Remove a document from the serverRequest messageMETHOD /path-to-resource /version-numberHeader-Name-1: valueHeader-Name-2: valueoptional

20、request body General request message structure GET /index.html /1.1 Host: Accept: text/*User-Agent: Mozilla/2.02Gold (WinNT; I)Example telnet requestlA browsers is not necessary to communicate with a web serverl telnet l GET /respond.html /1.1l Host: Response lMessage generated by a server after receiving and interpreting a requestlResponses contain:lStatus line with the protocol version, a status code, and a “reason phraselResponse-Header (containing information about the server)lEntity Header (meta-information)lEntity B

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論