




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、宀瓶跟孿澹鑼鹿走桑腓奔虱浜ASP-A New Method to Make Web Pages苫黿稚晁扌嫗凋化俯青鯔濰枕鴝糲魎技圪瘳蔓鉀族艫謙慈笑Abstract: The technology of Active Server Pages ASP) is speeding technology. This paper principle mainly introduced the differences between the technology of ASP and the technology of HTML, the work principle of ASP and its app
2、lication in-line object. The application of ActiveX technology to ASP,and a conclusion about the characteristics and functions of ASP was drawn. In the end we listed the source program of the technology of ASP applied in actual project for reference.鷙俗舍脂豐濱松吼觚簪趨萏選Key Words: ASP, HTML, Web Server駁洄韭帆菽
3、街黠濃蹼牽溺鐙痙ASP is Web Servers script environment, which explains script in Internet and intranet stations Web Server. It can explain and execute every request, which are sent by IE, and then responses and executes active, interactive and high efficient Web Server applied program. In construction any su
4、ccessful and practical station Web, ASP is essential to Web Server.刑綢免剁虔靂坫瀋倆邈裔阿衾1. ASPS and HTML 坭結(jié)滋頌評(píng)栲紲痦雜候蛔染锍When it comes to ASP, we have to talk about another language, in which we construction Web Site need: Hyper Meta Text Language, which is short for HTML.爺看集醇鴕螃饌躥塋耳痼琳菜 HTML usually describes a
5、 pages all basic factors in text description language. All content and model shown by page to users are included in a smaller script file. Usually designers use as seen as is compliers such as FrontPage 98, Netscape Gold 3.0 and so on design a page and then upload it to Web Server. After using brows
6、er download this script file from Web Server, browser will explain script file into colorful page, which are designed by users, it is enjoyed and read by users automatically.嗯針吩鵪嘿叔奶些酰標(biāo)鱘揚(yáng)沫 But, a web site only having HTML page is dull. Because users browse this page every time, they see all the same
7、things unless designer refreshes this page. At the same time, as not having interconnected operation with users. Not having interfaced with enough database resource, these web stations content is very single. Although Web applied program written in CGI technology can be changed into active web page,
8、 it can only be made with a single data operation, not having interconnection capacity. And has very high and strict request to designers. It needs making a CGI program for every acquirement, its work is very large and its Codes are not all successfully executed. When many users visit a CGI at the s
9、ame time, it will make some program copy operated in server pot, slowing down server as increasing program, leading to slow down users visiting.碌北磕庳障難蟄讜哨剞閱漚疫Fortunately at present we own ASP, user may make selected browse with much page in Web Station, and design some tables with this page, which ar
10、e filled in by user then obtain more information about user, If web server and database server interface have connected, then we can see more and newer information .ASP designs active page, it may receive information which is referred by users, and responses 嗷噬季掉鐨槍鎪語賃新場(chǎng)糍炊霞亻淵彤礦輔邛飭巧壘樵炳玨quickly. Among
11、them data can changed as actual statement and not need people refresh Web Page by self can satisfy application request. For example when we have filled in table and send HTTP request in IE, it may need Web Server executes an applied program designed by table, not a simple HTML file. This applied pro
12、gram analyzes some inputted data, and get responded results (usually are results set of database searching) based on different data into browse in form of HTML. Data in database is variable any time but the applied programs executed in server need not be changed, web page information obtained by vis
13、itor will keep fresh all the same.殖炔愧景骺璐佶箐棚琺信鳶氅2. The work principle and configuration ASP誶戛守猢鷥畚菸獺嬡歧刀羔電 In server machine, we may apply an ASP homepage; web server should responses this HTTP request and explains this applied file. When it meets any compatible script with Active X Scripting (for exam
14、ple VBScript and JavaScript), ASP can ask proper script to deal with it. If script instruction includes request of visiting database, it can connect with the behind database by ADOPB and ODBC. It may execute visiting database-by-database visited machine. ASP script is explained and executed in Web S
15、ite, it may make proper HTML homepage based on visited database automatically to responses users request. Web Server responsive in all sending and receiving.槐煉傘酞漚嗉評(píng)九醭冗藪皖崦In practical application, when ASP meets script command of visiting database. it can talk with database ADO (ActiveX Data Objects)
16、 and make execute results create a HTML page averted to server pot to response IEs apply. What we can see page in users IE is shown in single HTML, for example, content of behind database expressed in form of table. As ASP combinated with JavaScript and VBScript. it can visit ActiveX component by pr
17、ogramming and has the capacity of produced HTML automatically, so it is an efficient way in constructing active web site.梧畔虎艮畔張阱估蠕瘃鐙瞠襁In structure, ASP communicated database by ODBC or ADO, so it can be up compatible with much different database system. For down layer, HTML produced by ASP has wide
18、applied for Client IE. But Web server supported by ASP is very little, and it confine to several Microsoft Web Server. Their lowest versions are:酢庸襖笸列確故酴俄釩鰻嗎夙Windows NT Server 4. 0: Microsoft IIS (Internet Information Server) 3.0;囪峪靖股縞嚅鄱逍屏檜快徨當(dāng) Windows NT Workstation 4. 0: Microsoft Peer Web Services
19、 3.0;告蜃鏗旰潮恚遛紕雕犭勃頂藜 Windows 95 : Microsoft P WS (Personal Web Server) 1. 0,Win95 of Chinese version should suitable with PWS of Chinese.迸冱廊白噗詵唯群鲆供喝贅猩3. ASPs six inside objects and their application 磣蒈妻魏盧爿殫辭桿慘慢財(cái)鳥ASP is self provide with six inside objects, which are can directly used by ASP script.The
20、y are: 剿葫蜉箴肉罹嬪持底鶘授垠漳request: waiting for users information沛恫察氯隘倚土亥眙否芏咭墟response: deliver information to user苜堊纛釔皿孝妓迫踢浪巒吼對(duì)serve: provide method and characterizes of visiting server 膿泐匪約瓷墜耢芤嘿鈺糶騮喃cookies: attach to set object of Request object and Response object量灘頃視每迢栗蚜旒網(wǎng)蚶垌真application: preserve and u
21、se some common information among many homepages in an application program.虍鋁況嘍負(fù)燙挖肩裥梏老留河阻蛇熒芎踢恢厄鰉約嫻何猾朧Session: preserve and use some common information among many homepages in a user磣鯨楮罰斕償杌摔梔禿榮戈德Among them, using inside object one and two can realize Webs interactive function, using inside object five
22、 and six can solve compatible application problem.慟騖傺澆汲螭岡媯新琶從啶荔One mainly characteristic of ASP is complier able coherent application program, which can share information between some pages. Using inside Application and Session object can realize these functions.孬鑷三輯簪限詈咎謹(jǐn)畦趴敢久Application object keeps
23、 the same information in an applied program; all components of this applied program can share. In order to prevent it changed by many users, it provides lock and unlocks two methods. For example:婕柏賻鬣冬鎩厥萄喬曼北陵榜Application. Lock forbids other users to change application information.崗嚇簫赤環(huán)庫暹到穆鞲挫昴遐Applica
24、tion. Unlock permit other users to change application information.帽悛猷牦岢憷粘菘吐料專又墓 We can use Session object has a narrower usage range than Application object. It keeps only one application information, which belongs to only one user. ASPs application program may have only one homepage, and may also h
25、ave several homepages. All files lie in one false location. Session object can let a user share all information in one homepage. When user first applies for an *.asp in an applied program. ASP will give this user a Session ID which can identity user solo, then can identity different users in the sam
26、e applied program.擺摧竄逗罕揚(yáng)蝠丸擋慳散晰珈Cookies object mainly record some data input by user. Its memory location is users IE, and it has use expire, certainly designers can control it.勤蛙加禧怕雀京宮咂呃傯硝埭4. ASP and ACTIVE X鰨揪獗髁芍憮樺觫淠舡隕竽秒When we make Web with ASP technology, we have to follow with this principle. It
27、 is that, only in cohere between ASP Server script and component object model, can we make out practical and useful information software. ASP script is a connection, can connect some component objects with some certain characteristic function objects to form finish software. This industrial principl
28、e is similar to the process of hardware factory producing board card, these component objects are equivalent to chip have extend circuit, but ASP only connect with chip, thus component object play a central role.叼襻眚他語忉默呃畢逝曖石代COM, which is Windows software standard based on binary, developed, based o
29、n OLE technology gradually. We can communicate based on COM standard when write component object in different language. COM is technology and standard. It is named after ACTIVE X in business. 菌豕岢謊洚卜巳柁執(zhí)傘縛炯嵩In making Web, the most important is using ADO object to visit database. After user login on We
30、b, Web Server executes program of database server eloigning program automatically, then for some latter and complex request occasionally, Web Server explains and executes VBScript and Java Script statements inside ASP pages automatically, then operate SQL inquire and backward the inquired results to
31、 users.鄣酴阝懋柢滸岌慧陳燒漏犋欄ADO(ActiveX Data Objects)which is a good special object set of visiting database provide ASP with a whole station site database visiting method and. It can serve for server and offer homepage content with database information. By executing 犖褚施迪捏斛曙磲叱惚督聳氛攵鋈蔓娥悝蝥豳涌陌崮沂佴瑙SQL command, u
32、sers can input, refresh and delete Web Servers database information in IE. 汨閹軾撬乩觸憤噎竄咋幌蛑卉ADO uses inside Record Sets object as datas main interface. ADO can use VBScript and Java Script statement to control visiting database, and input and see inquire results. ADO can connect much database support by
33、 ODBC, for example, SQL Server, oracle Informix and so on. 榕購倮焙媳刪孚裂侉腩濘卵果In using, at first, we need make proper DSN (data source name) in ODBC of control board. and choice system data source name, specify drive program of use, for example, SQL Server input DSN. In data source name and specify server
34、 and database.萜睿艦腰干攙曦畎死款鱟孺量The flow chart of WEB database visiting is shown in following chart one 暹芳嫜腱件函鈾詎刀回訟鋒寄Designers can make some characteristic component object themselves in require to finish some special job, we can write in Visual Basic, Visual C+, Delphi, Java and so on. There are two cla
35、ssify of component object self making:尷涂桶用鉅粳鈥恩喻估骶艴杳One is *.dll file produced by classify. after machine registered, it can be used by Set object namein ASP script. In this using process object is work in behind server. The result of process plays front IE by HTML, which is produced by system automo
36、bile . 憲尾負(fù)額邏領(lǐng)鑠櫞漆恣弘頂囚Another is *.ocx file. Usually the seeable object Active X can directly imbedded in *.asp homepage, it needs using of HTML to insert page. Usually after finish produce component produced to produced to *.cab file in unloaded request. In this using way object should download from
37、sever at first, and then operate in front IE of client. When downloading first time, the irrelative *. Dll and *.ocx files should setup and register at local. Reuse latter, we can abstain directly without downloading. This is what Active X is better than Java Applet.薩慘憬榪翰承蹼雩跣犖井槿儐From the far sight,
38、the combination using of ASP and COM object is certainly a new and characteristic technology. It is more important that give out a new software design method. Hardware technology method is well applied into software object-oriented analysis design and realization. Making notion of object-oriented an
39、d method from the level of language tool to applied systems.豈磴頓襖頭硝潛虔箋指岫壹嶁5. ASPs characterize and function猢嘩熔椴溶嶸退洽車袈襠瞀糝5.1 ASPs characterize裂椎滑躦伴擎鶚訖顏羰騅開單(1) Explain and execute庳卉灼諾沮狽汕救玀鳘葑弒鐳ASP script imbeds in HTML. It is easy to get, without complier or link can explain and execute directly.杏捆缺耶慷客暢
40、檄枋嗒栽薪圮(2) Without support of IE 樓冬手當(dāng)尉虜平笄唱誓他嗷價(jià)User only uses IE of explainable simple HTML code. It can browse homepage designed by ASP. ASP script is executed at server site. Users IE does not need support it.報(bào)仝旅侈位說齊攣節(jié)炙抗囑窈(3) Using object-oriented technology 篁閌津稔挎懦窟呢聾婀嗽挪鶇As above said. It is conveni
41、ent to bring about system COM and ASP inside COM in ASP script. It may broad its capacity by making Active X Server 衫耦烏映溧成梗與蝎藎急哇猾翹儺緩狀傲鳥江簦閥罨癖理循Component.薜娌蝮揉嗵辟識(shí)耠碹勰煌糧古(4) high secret 狠賺耿瘃痞咼負(fù)豈瞰觸夕人紅When users exploring Web Site, they can easily see all source code for Web HTML homepage, so the fruit gai
42、n of designer for site work is easily be got by others, but ASP script is executed in Web Server, and what send to users IE is common HTML code which is the result of executing ASP. Thus users cannot see actual source program, and program code written by designers cannot be robbed.卜膣攘煉茄昶朝篙垌繭瞽圭蔬5.2 A
43、SPs function檗侍祝贈(zèng)拷援奧狙跎療閑滌飚(1) Compile Server Site database list. Using IE is can input、refresh and delete data of database in Site Server database; (2)deal with user table input which is deliver from IE to Site server; (3) Realize visiting timer and principle function; (4)Cookies objects good use, re
44、ad and write hard driver file by cookies to recorder users data; (5)It can realize common information among several homepage to make complicated business Web applied program; (6)Using simple script language such as VBScript or JavaScript and HTML code, complete applied program of Site quickly. By Si
45、te server executing script language, can get or verify script language which executed in client, in it easy to maintain WEB; (7) As can bringing in component object, it can use Visual Basic, Java, Visual C+ and so on to make ActiveX Server Component object. It can satisfy our special needs in using
46、in ASP, so broad ASPs function very strong. 泛剡聯(lián)嘩怯意燦腹某蕞訖?quán)蟛倔勉顿|(zhì)膊炸躊緞蝗苛瀧獐壅畈窶螈摳苔編歆俞脲投只壟傯介斧誘排砧僬糇牮棋茗彈滟軺癸娌勞浙換稱躞胯廾輕我醮魅炅縵滔只噴緹拳碉珍哩頤靼樟跋乜表召句鐾鏝誦慧褻榘籠蕩臚ASP-網(wǎng)頁制作新方法迂鯤苣曙峨諤磕亳封空沱白丹飲繳溺駱烘殮浯躁嘗煽華戤毽摘要?jiǎng)討B(tài)服務(wù)器頁面技術(shù)-ASP是一種方興未艾的技術(shù),文中主要介紹了ASP技術(shù)與HTML技術(shù)的區(qū)別、ASP的工作原理及其內(nèi)嵌對(duì)象的應(yīng)用、Active X技術(shù)在ASP中的應(yīng)用,總結(jié)了ASP的特點(diǎn)與功能.在本文的最后,附上了部分在實(shí)際項(xiàng)目應(yīng)用ASP技術(shù)的源程序,
47、以供參考。噔當(dāng)蝎暫媒菔焯旅烘碌夙韓泔關(guān)鍵詞ASP, HTML, WEB服務(wù)器 苫鍛具嘴群煺課責(zé)遣抬蟋必存Active Server Pages的中文解釋是動(dòng)態(tài)服務(wù)器主頁,在IT行業(yè)中簡(jiǎn)稱為ASP。帕罷磚邑虢敘嶁得母眷產(chǎn)余耍 ASP是一個(gè)WEB服務(wù)器端的腳本環(huán)境,在INTERNET站點(diǎn)和INTRANET站點(diǎn)的WEB服務(wù)器上解釋腳本,它可以解釋并執(zhí)行由瀏覽器端傳來的各種請(qǐng)求,然后響應(yīng)的產(chǎn)生并執(zhí)行動(dòng)態(tài)、交互式、高效率的WEB服務(wù)器應(yīng)用程序。在任何一個(gè)成功實(shí)用的網(wǎng)站W(wǎng)EB建設(shè)中,ASP不含為WEB服務(wù)器的靈魂。記猛猷淙災(zāi)睿藤躋敝轉(zhuǎn)南蘼喂1. ASP與HTML碘庀進(jìn)鯤泣鮮費(fèi)變廝蜱蕈陘為 提到ASP,我們
48、就不能不提起建設(shè)WEB站點(diǎn)所必須的另一種語言,即Hyper Text Meta Language一超文本鏈接語言,人們常簡(jiǎn)稱之為HTML。釘關(guān)彡猞學(xué)漓顓谷葶鱸夔鋝圓 HTML通常以文本描述語言來描述一個(gè)頁面的所有要素,頁面呈現(xiàn)給用戶的所有內(nèi)容和格式都被包括在一個(gè)相對(duì)較小的腳本文件中。通常設(shè)計(jì)者使用諸如FRONTPAGE 98 .Netscape Gold 3 .0等HTML的所見即所得編輯器設(shè)計(jì)好一幅頁面,然后將其上載到WEB服務(wù)器中,在用戶使用瀏覽器從WEB服務(wù)器下載這個(gè)腳本文件后,瀏覽器自動(dòng)將該腳本文件解釋為設(shè)計(jì)者精心設(shè)計(jì)的五彩繽紛的頁面,供用戶觀賞和閱讀。踽岑管煜溏嬡材嗝翎苫耐慎紐但是光
49、有HTML頁面的WEB站點(diǎn)是呆板的,因?yàn)橛脩裘恳淮螢g覽該頁面,都只能看到同樣的東西,除非設(shè)計(jì)者更新了這幅頁面。同時(shí)由于沒有和用戶的交互式操作、由于沒有和豐富的數(shù)據(jù)庫資源接口,這樣的網(wǎng)站的內(nèi)容也顯得特別單調(diào)。盡管用公共網(wǎng)關(guān)接口(CGI)技術(shù)編寫的WEB應(yīng)用中可以動(dòng)態(tài)地生成頁面,但只能楹繩嚆顓敫麓扒胬自雕灘潮踏潺嶗衤落暈罔丹暾躁鏝蜘揄攜查妲廈赴跤淅放樟漯犁絀拎柬進(jìn)行單一的數(shù)據(jù)操作,沒有交互功能,且CGI對(duì)開發(fā)人員要有很高的要求,要為每個(gè)查詢編寫一個(gè)CGI程序,工作量大,且代碼的重用率低。當(dāng)多個(gè)用戶同時(shí)訪問一個(gè)CGI時(shí)會(huì)造成服務(wù)器端運(yùn)行一個(gè)程序的多個(gè)復(fù)制,使服務(wù)器因?yàn)檫M(jìn)程的增加而變慢,導(dǎo)致用戶訪問速
50、度降低。氚咄轤崤袒亂端氘過芝譙譴芎 所幸的是,我們現(xiàn)在擁有了ASP,用戶可以在WEB站點(diǎn)的大部分頁面進(jìn)行選擇的瀏覽,并且通過這種頁面設(shè)置一些表格供用戶填寫,從而獲得用戶的一些信息。如果WEB服務(wù)器和數(shù)據(jù)庫服務(wù)器相接口,那么,我們就可以看到更多的、更新的、甚至是實(shí)時(shí)的信息 。ASP所設(shè)計(jì)出的是動(dòng)態(tài)主頁,可接收用戶提交的信息并做出反應(yīng),其中的數(shù)據(jù)可隨實(shí)際情況而改變,無須人工對(duì)網(wǎng)頁文件進(jìn)行更新即可滿足應(yīng)用需要。例如:當(dāng)在瀏覽器上填好表單并提交HTTP請(qǐng)求時(shí),可以要求在站點(diǎn)服務(wù)器上執(zhí)行一個(gè)表單所設(shè)定的應(yīng)用程序,而不只是一個(gè)簡(jiǎn)單的HTML文件。該應(yīng)用程序分析表單的輸入數(shù)據(jù),根據(jù)不同的數(shù)據(jù)內(nèi)容將相應(yīng)的執(zhí)行
51、結(jié)果(通常是數(shù)據(jù)庫查尋的結(jié)果集)以H T ML的格式傳送給瀏覽器。數(shù)據(jù)庫的數(shù)據(jù)可以隨時(shí)變化,而服務(wù)器上執(zhí)行的應(yīng)用程序卻不必更改,客戶端得到的網(wǎng)頁信息會(huì)始終保持新鮮的魅力。繰黃畢蓮窬滂鷥倌少波身藹獄2. ASP的工作原理和配置趨蟒鬩宅遲蚴嚴(yán)齄攥溴議僭瞬 在客戶機(jī)申請(qǐng)一個(gè)ASP主頁時(shí),Web服務(wù)器響應(yīng)該HTTP請(qǐng)求,調(diào)用ASP引擎,解釋被申請(qǐng)文件。當(dāng)遇到任何與ActiveX Scripting兼容的腳本(如VBScript和JavaScript)時(shí),ASP引擎會(huì)調(diào)用相應(yīng)的腳本引擎進(jìn)行處理。若腳本指令中含有訪問數(shù)據(jù)庫的請(qǐng)求,就通過 ADODB或ODBC與后臺(tái)數(shù)據(jù)庫相連,由數(shù)據(jù)庫訪問組件執(zhí)行訪問庫操作
52、。ASP腳本是在服務(wù)器端解釋執(zhí)行的,它依據(jù)訪問數(shù)據(jù)庫的結(jié)果集自動(dòng)生成符合HTML語言的主頁,去響應(yīng)用戶的請(qǐng)求。所有相關(guān)的發(fā)布工作由Web服務(wù)器負(fù)責(zé)。軹錠華建兗疑囟灬逕腕坷殊粲在實(shí)際的應(yīng)用當(dāng)中,當(dāng)ASP遇到訪問數(shù)據(jù)庫的腳本命令時(shí),它通過Active X組件ADO( ActiveX Data Objects)與數(shù)據(jù)庫對(duì)話,并將執(zhí)行結(jié)果動(dòng)態(tài)生成一個(gè)HTML頁面來返回服務(wù)器端,以響應(yīng)瀏覽器的請(qǐng)求。在用戶端瀏覽器所見到的是純H T ML表現(xiàn)的畫面,例如用表格來表現(xiàn)的后臺(tái)數(shù)據(jù)庫表中的字段內(nèi)容。由于ASP結(jié)合了腳本語言JavaScript或VBScript,因此它可以通過編程訪問Active 蒞關(guān)跬盲奉倦幔
53、碟詆褚格憒虛糠巛粢鍤嗾僵勁沉構(gòu)炬捉裨殍X組件,并且具有現(xiàn)場(chǎng)自動(dòng)生成HTML的能力,所以它成為建立動(dòng)態(tài)Web站點(diǎn)的有效工具。北巋嘩郢哎茨榛蝗蘸衛(wèi)瑛噙蹭 在結(jié)構(gòu)關(guān)系上,ASP是通過ODBC或ADO與數(shù)據(jù)庫打交道。因此,向上層可兼容各類數(shù)據(jù)庫系統(tǒng)。而對(duì)于下層,ASP產(chǎn)生的H T ML對(duì)客戶端的瀏覽器又有廣泛的適應(yīng)性。但ASP所支持的Web服務(wù)器卻少之又少,而且只局限在微軟公司的幾種Web服務(wù)器,它們的最低版本分別是:鰭評(píng)哭思閔吣猾廄辯癖噢押蛔 Windows NT Server 4. 0: Microsoft IIS (Internet Information Server) 3.0;遂懈阮飩茨妝賞
54、屯蠡齠嗣熳漁 Windows NT Workstation 4. 0: Microsoft Peer Web Services 3.0;姚輅諍理捅璁釘泰攻路憋揆鉞 Windows 95 : Microsoft PWS (Personal Web Server) 1. 0,中文Win95應(yīng)配中文的P WS。漆陬洌扇濫宿糯坭謗莞贛鎵岢3. ASP的六個(gè)內(nèi)嵌對(duì)象及其應(yīng)用因塔獎(jiǎng)賁薨趑疑鳘荔瑙凜氍止 ASP本身提供了六個(gè)內(nèi)置的對(duì)象。這六個(gè)內(nèi)置對(duì)象可被ASP腳本直接使用,它們是:節(jié)歐纜骯賴攘髭锏舉袈吟軀俺 Request:取得用戶信息池霏廿胴湞志脬噶糅堿仕繡瞎 Response:傳遞信息給用戶驅(qū)漣懟閘釩崾
55、鵲洇兜擬隋囔補(bǔ) Serve:提供訪問服務(wù)器的方法和屬性黷及指拈州彈了砂狀距庀呦宵 Cookies:附屬于Request對(duì)象和Response對(duì)象的集合對(duì)象貶蒯眶吸精帛甘章暇囟鄴楞灰 Application:在一個(gè)應(yīng)用程序的多個(gè)主頁之間保留和使用某些共同的信息姨諂耪測(cè)竦腦纊厶椹螨鈐瞌矚 Session:在一個(gè)用戶的多個(gè)主頁之間保留和使用某些共同的信息侯雜閌埽莎簋季叮顎苧予棚櫧其中,使用內(nèi)置對(duì)象1 .2可實(shí)現(xiàn)Web的交互功能,使用內(nèi)置對(duì)象5 ,6可解決具有協(xié)作機(jī)制的應(yīng)用問題。徼秉謀哉捎哚犧欖績(jī)蚺鞋腔夜ASP的一大特色,是可以用來編寫具有協(xié)作機(jī)制的應(yīng)用程序,在多個(gè)用戶的多個(gè)主頁之間共享信息。使用內(nèi)置
56、的Application和Session對(duì)象可實(shí)現(xiàn)這些功能。粟簍矽丌鍾哏淦噤須茁瑙疤甄Application對(duì)象保存一個(gè)應(yīng)用程序共同的信息,使用此應(yīng)用程序的所有用戶都可以共同分享。為防止其被多個(gè)用戶同時(shí)更改,提供lock和unlock方法來實(shí)現(xiàn)互斥,例如:桌膛蚤滅擦匚跖吞券缸蝙垢枳肀胰慌糖圃跬季盜兒繆餃翕猶Application .lock禁止其他用戶更改Application的信息。奉遷紼琴黿鸞棰恨奈镩滿局偌Application. unlock允許其他用戶更改Application的信息。叫鋌摶兗棰飪勤汰拉鷸度吃份Session對(duì)象比Application對(duì)象的使用外延范圍小,它保存僅屬于
57、一個(gè)用戶的一個(gè)應(yīng)用程序的信息。ASP的應(yīng)用程序可以只有一個(gè)首頁,也可以有多個(gè)主頁文件,所有的文件均位于一個(gè)虛擬路徑下。Session對(duì)象可讓同一個(gè)用戶在多個(gè)主頁之間共享信息。當(dāng)用戶第一次在一個(gè)應(yīng)用程序中申請(qǐng)一個(gè)*.asp主頁時(shí),ASP將為該用戶分配一個(gè)Session ID號(hào),它將唯一地標(biāo)識(shí)用戶的身份,從而能將同一應(yīng)用程序的不同用戶區(qū)分開來。帕蒜孔臟液討悒檔揶瘸訓(xùn)圖湄Cookies對(duì)象主要記錄用戶輸入的一些參數(shù)數(shù)據(jù),它的存貯場(chǎng)所是用戶的瀏覽器,并且它還是有使用期限的,當(dāng)然設(shè)計(jì)人員可以控制這個(gè)期限。啥裥女軼哄草蹩苡秘雷諼詐峭4. ASP和Active X漂鷦髂紐窗角昨漆庚呔滓脆豌在利用ASP技術(shù)進(jìn)
58、行動(dòng)態(tài)Web開發(fā)的時(shí)候,應(yīng)遵循這樣一個(gè)原則:即ASP的服務(wù)器端腳本必須與微軟倡導(dǎo)的組件對(duì)象(Component Object Model)配合使用才能開發(fā)出具有實(shí)用價(jià)值的信息產(chǎn)品。ASP腳本相當(dāng)于一種粘合劑,把一個(gè)個(gè)具有特定功能的組件對(duì)象粘合在一起,以形成最終的軟件產(chǎn)品。這一軟件制作的工藝思想類似于硬件工廠生產(chǎn)板卡的過程,那一個(gè)個(gè)的組件對(duì)象就相當(dāng)于集成電路的芯片,而ASP腳本只是焊接芯片的焊接劑,由此可見組件對(duì)象起著核心作用。屈藍(lán)菠伴瓤嚯標(biāo)材逃筅墩蚴紙組件對(duì)象模型COM是微軟提出的一種基于二進(jìn)制的Windows軟件標(biāo)準(zhǔn),它是由OLE技術(shù)逐漸發(fā)展而來的。在使用不同語言工具寫成的組件對(duì)象之間,依據(jù)COM的標(biāo)準(zhǔn)可以進(jìn)行交互。COM是技術(shù)概念和標(biāo)準(zhǔn),其商業(yè)概念的稱謂則使用Active X。楝葑縱僚半峋驕糕瞪佤坌肉坻 在WEB網(wǎng)站開發(fā)中,最重要的就是使用ADO對(duì)象訪問數(shù)據(jù)庫了。用戶在登錄網(wǎng)站以后,WEB服務(wù)器就自動(dòng)執(zhí)行數(shù)據(jù)庫服務(wù)器程序登錄的程序,然后針對(duì)用戶以后的不斷的復(fù)雜的請(qǐng)求,WEB服務(wù)器自動(dòng)解釋執(zhí)行ASP網(wǎng)頁中內(nèi)嵌的VB Script或Java Script語句,然后運(yùn)行SQL查詢,最后再將結(jié)果反饋回給用戶。叼曷
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(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ǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 農(nóng)民承包煤礦合同范例
- 農(nóng)村裝電梯合同范例
- 大學(xué)生心理健康教育(第三版)教案:第三章 學(xué)業(yè)發(fā)展 成長(zhǎng)之基
- 上山步道施工合同范本
- 出售供電宿舍合同范例
- 冷凍豬蹄采購合同范例
- 個(gè)人融資顧問合同范例
- ktv加盟合同范例
- 黑土灘退化高寒草地土壤有機(jī)碳對(duì)生物炭添加的響應(yīng)機(jī)制研究
- 重慶市銅梁區(qū)郵儲(chǔ)銀行支農(nóng)問題研究
- 人體成分分析適應(yīng)癥禁忌癥
- 普通高中英語課程標(biāo)準(zhǔn)試題與答案(2017年版2020年修訂)
- DB3502-Z 5010-2018海綿城市建設(shè)工程施工與質(zhì)量驗(yàn)收標(biāo)準(zhǔn)
- 2024年內(nèi)蒙古巴彥淖爾市交通投資集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 春季行車安全行駛安全知識(shí)培訓(xùn)
- 產(chǎn)品制造工藝總方案
- 2024年云南呈貢區(qū)城市投資集團(tuán)有限公司招聘筆試參考題庫含答案解析
- T-ZJASE 024-2023 呼吸閥定期校驗(yàn)規(guī)則
- 新生兒藥物過敏
- 工作場(chǎng)所有害因素職業(yè)接觸限值-第2部分-物理因素
- 2024年度醫(yī)院醫(yī)學(xué)檢驗(yàn)學(xué)專業(yè)進(jìn)修回顧課件
評(píng)論
0/150
提交評(píng)論