大學(xué)課件基于Web的應(yīng)用系統(tǒng)開發(fā)_第1頁
大學(xué)課件基于Web的應(yīng)用系統(tǒng)開發(fā)_第2頁
大學(xué)課件基于Web的應(yīng)用系統(tǒng)開發(fā)_第3頁
大學(xué)課件基于Web的應(yīng)用系統(tǒng)開發(fā)_第4頁
大學(xué)課件基于Web的應(yīng)用系統(tǒng)開發(fā)_第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ī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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論